My sense is that release() isn't anything directly to do with garbage collection.
All you're really saying IMHO is "i've finished with this 'thing'", thus allowing the container/framework to recyle it, destroy it, or nominate it for an Oscar. ie release() != finalize() -----Original Message----- From: Niclas Hedhman [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 7:11 PM To: [EMAIL PROTECTED] Subject: More Release() Leo & Leo, you both represent the "theoretical committee", and I would like to have your views on; Spec for release() "Return the Object when you are finished with it. " The recent debate (close to flame war) over release() has brought about a lot of arguments in favour and against the method. I would like to crystalize the issue to what I see as the kernel of the apple; Java don't have destructors. For a good reasons, of which I won't go into here (program C++ for a couple of years to get the point). Some objects NEEDS explicit destruction, e.g. FileInputStream. Avalon re-introduces the destructor, in the form of ServiceManager.release(). Why is that such a good idea, when the destructor in Java is not? Niclas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
