JVM_OnUnload - like method?

Is there a such method in JVMTI or JVMDI? I need to clean up some resources which are initialized in JVM_OnLoad method? e.g., I instantiate an object of a class, and I want to release the object when the jvm is unloaded.

I have digged for some time, but cannot figure it out?

Does anyone know the answer?

[323 byte] By [Honghaia] at [2007-10-2 22:02:44]
# 1
There is a correction which I must give. I am using JVMDI along with JDK1.4. I cannot make any use of the APIs provided by JVMTI. In JVMTI, I found the function, JNIEXPORT void JNICALL Agent_OnUnload(JavaVM *vm). Is there a similar function in JVMDI?
Honghaia at 2007-7-14 1:19:13 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Yes, Agent_OnUnload is the function you want . So why can't you use JVM TI? Is it because you are stuck on J2SE 1.4? One thing to be aware of is that JVMDI was deprecated in J2SE 5.0 and removed in Java SE 6.
alan.batemana at 2007-7-14 1:19:13 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...