On Sep 4, 9:39 am, "Pablo Riesgo Ferreiro" <[EMAIL PROTECTED]>
wrote:
> Hi,
> This is more another doubt than a solution. Can't you call finalize() on the
> object you want to destroy?
>
> As finalize is already a method in the class Object it must be accesible for
> every other object even if it's overwritten. So for this particular problem
> we could do:
>
> myObject.finalize();
> count--;
>
> Or is this method only accessible for the garbage collector?
>
> Anyway, the java way of doing this I think would be making sure there are no
> active references to the object to destroy, decrease the count and let the
> the garbage collector work
Yes, exactly. See also this thread:
<http://forums.sun.com/thread.jspa?threadID=618632&messageID=3465558>
And the best you can do is help you in googling for "How to destroy an
object explicitely in java" and look especially at the questions/
answers from Sun (forums, technical tips, documentation, etc.). Those
are the most reliable. Or even better post your question in the Sun
forums.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---