On Tue, Oct 28, 2008 at 9:58 PM, Gili Tzabari <[EMAIL PROTECTED]>wrote: > > That being said, I think we can have our cake and eat it too. Please > take a look at http://forums.sun.com/thread.jspa?messageID=10484065 and > > http://java.sun.com/javase/6/docs/api/java/lang/ref/package-summary.html#reachability >
I don't understand what you're getting at. The problem is that we have a strong reference chain from Thread -> MyRunnable -> MyRunnable's Class -> Application ClassLoader. My code above breaks the dependency between MyRunnable (Finalizer) and the application classes and then loads MyRunnable in its own class loader so that the Application ClassLoader is eligible for collection. > In short: you'd expose a single API call consisting of 2-3 lines of > code (shutting down the thread). In exchange, you'd retain the original > clean implementation of FinalizableReferenceQueue. I know you're not a > fan of exposing a new method but *please* consider the cost/benefit for > us poor web users :) > FRQ is actually in Google Collections, not Guice. I think I'd use my code above before I'd add a shutDown() method to the API... Bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" 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/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
