Proposal: @Unloadable Class defination

Noel Grandin noel at peralex.com
Wed Mar 25 01:37:25 PDT 2009


It seems that this use-case would be better solved by using
WeakReferences and loading binary data using Class#getResource for any
large static data that is easily regenerated.

Regards, Noel.

Tom Hawtin wrote:
> Daniel Cheng wrote:
>
>   
>> MAJOR ADVANTAGE:
>>
>> Developer may define some class as @Unloadable can be unloaded when needed.
>>
>> MAJOR BENEFIT:
>>
>> Currently, VM are not allow to unload Class with reachable
>> ClassLoader, this is required for "static variable" to be keep. But
>> this means Class have to keep in memory even if the class is rarely
>> used. Sometimes, the value static variable can be recreated at any
>> time,
>>     
>
> I'm not entirely sure what you intend this to be used for.
>
> Do you want normal pieces of application code unloaded?
>
> Do you want large blobs of static data to be unloaded? In which case 
> don't you want more fine control over that?
>
> Do you want small pieces of generated code to be unloaded? Perhaps 
> individual class loaders are more appropriate.
>
> Tom Hawtin
>
>
>   


Disclaimer: http://www.peralex.com/disclaimer.html





More information about the coin-dev mailing list