On Wed, Jul 22, 2009 at 3:07 PM, Jess Holle <[email protected]> wrote: > 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. >
It's like your resumé, it always better to have some extra references.. > > -- > Jess Holle > > > > > -- Viktor Klang Rogue Scala-head Twttr: viktorklang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. 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/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
