java unload static fields

Posted by Alina Danila on Stack Overflow See other posts from Stack Overflow or by Alina Danila
Published on 2011-11-19T17:46:14Z Indexed on 2011/11/19 17:51 UTC
Read the original article Hit count: 386

Filed under:
|
|
|

I have a java class that uses complex static fields which need special operations as close() so that they are safely cleaned by GC.

For the initialization of static fields I use the static block. But I don't now how to unload the static field safely, so that I can call the close() method before the field is cleaned up by GC.

Is there any way to unload a static field, similar to the static initialization block?

© Stack Overflow or respective owner

Related posts about java

Related posts about static