#include "wx/persist.h"
+namespace
+{
+
+wxPersistenceManager* gs_manager = NULL;
+
+} // anonymous namespace
+
// ============================================================================
// wxPersistenceManager implementation
// ============================================================================
+/* static */
+void wxPersistenceManager::Set(wxPersistenceManager& manager)
+{
+ gs_manager = &manager;
+}
+
/* static */
wxPersistenceManager& wxPersistenceManager::Get()
{
- static wxPersistenceManager s_manager;
+ if ( !gs_manager )
+ {
+ static wxPersistenceManager s_manager;
+
+ gs_manager = &s_manager;
+ }
- return s_manager;
+ return *gs_manager;
}
wxPersistenceManager::~wxPersistenceManager()