Proposal: @Unloadable Class defination (original) (raw)
Noel Grandin noel at peralex.com
Wed Mar 25 01:37:25 PDT 2009
- Previous message: Proposal: @Unloadable Class defination
- Next message: Proposal: Large arrays
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Proposal: @Unloadable Class defination
- Next message: Proposal: Large arrays
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]