On 5/25/2011 11:13 PM, Steven Schveighoffer wrote:
http://www.digitalmars.com/d/2.0/class.html#StaticDestructor

-Steve

Static Destructor maybe executed when the class is being unloaded GC?
Because this is a class level. It is more like the application level exit and such.

That is not really the same as:
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Runtime.html#addShutdownHook%28java.lang.Thread%29


This is triggered when:
# The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit) method is invoked, or

# The virtual machine is terminated in response to a user interrupt, such as typing ^C, or a system-wide event, such as user logoff or system shutdown.



--
Matthew Ong
email: on...@yahoo.com

Reply via email to