Re: Question about bundle class loader lifecycle

2009-08-17 Thread Richard S. Hall
On 8/17/09 5:27, Holger Hoffstätte wrote: Todor, Richard - thank you for your responses. I understand how various GC schemes work - I guess I should have asked a more concise question like "does the framework explicitly keep a reference to the classloader, and if so, when is that reference relea

Re: Question about bundle class loader lifecycle

2009-08-17 Thread Holger Hoffstätte
Todor, Richard - thank you for your responses. I understand how various GC schemes work - I guess I should have asked a more concise question like "does the framework explicitly keep a reference to the classloader, and if so, when is that reference released". :) However in the meantime I found ou

Re: Question about bundle class loader lifecycle

2009-08-14 Thread Richard S. Hall
As with everything, stuff can only be garbage collected when there are no more references to it. Native is referenced from a ClassLoader. ClassLoaders are referenced from Classes. Classes are referenced from instances. So, you cannot have any references to any of these things from a bundle, oth

Re: Question about bundle class loader lifecycle

2009-08-14 Thread Todor Boev
There is no well defined time. A class loader is garbage collected just like any other object. I.e. when there are no direct strong references to it. Objects refer to their reflective Class objects. And each Class object refers to the ClassLoader that *defined* it from raw bytes. When you un

Question about bundle class loader lifecycle

2009-08-14 Thread Holger Hoffstätte
Can someone shed a ray of light on when exactly a bundle's classloader is (supposedly) made eligible for GC? I'm working with native code and while it is not required to re- or unload my bundle, it would be nice to have a better grasp of potential lifecycle issues. Right now felix (on Windows) fai