Re: Any application shutdown hooks?

2011-05-26 Thread Matthew Ong
On 5/25/11, Steven Schveighoffer wrote: If you want a static dtor that runs on every thread shutdown, use a normal static dtor. If you want one that runs on the entire application shutdown, use a shared static dtor. I saw some commits change a static dtor to a shared static dtor and wondered

Re: Any application shutdown hooks?

2011-05-25 Thread Matthew Ong
On 5/26/2011 12:23 AM, Andrej Mitrovic wrote: On 5/25/11, Steven Schveighoffer wrote: If you want a static dtor that runs on every thread shutdown, use a normal static dtor. If you want one that runs on the entire application shutdown, use a shared static dtor. I saw some commits change a st

Re: Any application shutdown hooks?

2011-05-25 Thread Andrej Mitrovic
On 5/25/11, Steven Schveighoffer wrote: > If you want a static dtor that runs on every thread shutdown, use a normal > static dtor. If you want one that runs on the entire application > shutdown, use a shared static dtor. I saw some commits change a static dtor to a shared static dtor and wonder

Re: Any application shutdown hooks?

2011-05-25 Thread Steven Schveighoffer
On Wed, 25 May 2011 11:52:14 -0400, Steven Schveighoffer wrote: On Wed, 25 May 2011 11:35:51 -0400, Matthew Ong wrote: 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

Re: Any application shutdown hooks?

2011-05-25 Thread Matthew Ong
On 5/25/2011 11:52 PM, Steven Schveighoffer wrote: If you want a static dtor that runs on every thread shutdown, use a normal static dtor. If you want one that runs on the entire application shutdown, use a shared static dtor. -Steve Module Destructor: Cool feature that I can consider to use fo

Re: Any application shutdown hooks?

2011-05-25 Thread Steven Schveighoffer
On Wed, 25 May 2011 11:50:16 -0400, Ali Çehreli wrote: On 05/25/2011 08:35 AM, Matthew Ong wrote: 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? Bec

Re: Any application shutdown hooks?

2011-05-25 Thread Ali Çehreli
On 05/25/2011 08:35 AM, Matthew Ong wrote: 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 applicatio

Re: Any application shutdown hooks?

2011-05-25 Thread Steven Schveighoffer
On Wed, 25 May 2011 11:35:51 -0400, Matthew Ong wrote: 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

Re: Any application shutdown hooks?

2011-05-25 Thread Matthew Ong
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

Re: Any application shutdown hooks?

2011-05-25 Thread Steven Schveighoffer
http://www.digitalmars.com/d/2.0/class.html#StaticDestructor -Steve

Any application shutdown hooks?

2011-05-25 Thread Matthew Ong
Hi, If I am writing a database library such as DSL, Data Service Layer, there is a need for me to do a good clean up for the connections/results sets/transactions that this library is currently handling. How ever, if another library/package somewhere else calls for a java.lang.Runtime#publi