[686] in java-interest
Re: lifetime of objects
daemon@ATHENA.MIT.EDU (Fritz Hohl)
Thu Jul 13 09:06:30 1995
From: Fritz Hohl <hohlfz@orgel.informatik.uni-stuttgart.de>
Date: Thu, 13 Jul 1995 13:42:26 +0200
To: java-interest@java.Eng.Sun.COM
In-Reply-To: Mail from 'Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>'
dated: Wed, 12 Jul 1995 13:58:22 -0800 (PDT)
>> I can remember that creating new objects in C++ within methods was one
>> of the most certain way of getting a core dump.
>> The next java program seems to work, but can I be sure that the
>> instances that created in add() of HtContainer have the same lifetime
>> as the hashtable in HtContainer?
>Java uses a garbage collector. This means that you never have to worry
>about the lifetime of objects. As long as you can reference them somehow
>the are alive.
Is there an explicit possibility to destruct objects given a reference
on that object?
Greets, Fritz Hohl
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com