Hi,
I compiled this class in a DLL:
It's used by several processes and encapsulates the access to a database. DB is opened in CTOR and closed in the DTOR. But when does the DTOR gets calles in this case? Never? Or if no process is using it any more in windows decides to unload the DLL (does this mechanism even exist?)?Code:class DbQuery :boost::noncopyable { DbQuery(); ~DbQuery(); pthread_mutex_t mQueryMutex; public: inline static DbQuery& instance() { static DbQuery db_query; return db_query; } [...] };
Thank You!