kirk wrote:
> Jess Holle wrote:
>   
>> kirk wrote:
>>     
>>>> If only finalize() would be reliable. 
>>>>         
>>> finalize is reliable, you just have to understand how it's implemented.
>>>       
>> In some situations/VMs it can also be easy to outpace the finalizer 
>> thread(s) such that these don't keep up.
>>     
> rare.. I tried a simple microbenchmark to see if I could get app threads 
> to out pace the finalization thread (opening 1000s of files without 
> every closing them). It never worked. Object creation (not collection) 
> generally becomes a bigger problem before finalization does.
>
> There is a lot of myth surrounding finalization and most of it is just that.
>   
I've actually never seen this outpacing on a Sun JVM.

On an IBM JVM, though, that's another story.  Of course there we've seen 
cases where objects that are clearly referenced are finalized ahead of 
time!  The workaround was to add more references to the object.

--
Jess Holle


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to