java unload static fields
- by Alina Danila
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?