--------------070100070406070206060806 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit I believe this is the case if the garbage collector never runs. That is, if the program exits before it is necessary. Also, there are situations in which objects are never released, so the finalize method won't be called then, either. If I recall correctly. -Justin Daniel Nugent wrote: > Does anyone know under what conditions the finalizer won't be called? > > On 3/31/06, Marcin Mielki <lopexx / autograf.pl> wrote: > >> PrimaryKey wrote: >> >>> Hello! >>> >>> After reading the Pickaxe book I noticed it provides almost no >>> information about object lifecycle and no mention of destructors. As a >>> Java/C# guy my gut reaction was: Wouldn't it be nice to have a >>> "unintialize" method to be called when the object is being destroyed? >>> >>> >> Java does not have destructors either. finalize method is not guaranteed >> to be called >> >> >> >>> Another thing I find very surprising for a language having such a rich >>> OO model is the lack of static constructors (available in C# and somehow >>> in Java) and static destructors (something I always wanted to have in >>> Java/C#). >>> >> Ruby has them. Every class definition is an executable code (public, >> private, protected are methods) so you can alternate method definitions >> with arbitrary code (in fact, this is much more powerful mechanism than >> static blocks in Java and static constructors in C#) >> >> lopex >> >> >> > > > -- > -Dan Nugent > > Don't Feel Like Typing? Send me a voicemail: > http://odeo.com/sendmeamessage/DanNugent > --------------070100070406070206060806--