>>By the way could you add the following to VFS
>>public static void close() {


>BTW you know its sideeffects?
>You no longer can use VFS in threaded environments as this close closes
>ALL filesystems.
>
>>(I have some gc problems and this alleviates it a bit)
>>
>>
>Lets try to figure it out. I use vfs in an webapp and never had a
>problem with memory consumption.
>Maybe I can add a method to dump the cache content, that way we might
>find whats the problem - if its VFS fault.

Well I don�t see the gc problem as vfs problem as much as jvm gc problem.
My app is a plugin to an editor that I want to reload by removing all 
references to plugin classloader. And then load a new version with a new 
classloader. The problem is that no matter how much I get rid of references 
(and see with a memory debugger that there are no references) the classloader 
and the classes it has loaded will not go away.

I have tested that the unloading of classloaders does work in simple cases but 
not when a "lot has happened" in the classloader.

Now when the classloader does not get unloaded neither will any static fields. 
VFS has some static fields for perfectly good reasons (caching). So all I need 
is the ability to tell VFS that I am done with you try to free the memory you 
have reserved (in static fields) because your classloader does not want to 
unload you.

Actually I should send this request to SUN and say that there should be a close 
method in classloader but I don�t think they would listen.

Note. I also use the deprecated stop method in thread class because in some 
cases it is the only way and is very good. So if it could help you could also 
make the close method deprecated and say in docs that one should be VERY 
careful when using it.

- rami

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to