diff --git a/include/wx/persist.h b/include/wx/persist.h index 24cd503142..392bf53d9b 100644 --- a/include/wx/persist.h +++ b/include/wx/persist.h @@ -77,7 +77,7 @@ public: // deletes the associated wxPersistentObject void Unregister(void *obj); - + // save/restore the state of an object // // these methods do nothing if DisableSaving/Restoring() was called @@ -136,6 +136,10 @@ private: m_doRestore = true; } + // trivial but virtual dtor + virtual ~wxPersistenceManager(); + + // helpers of Save/Restore() // // TODO: make this customizable by allowing @@ -230,7 +234,7 @@ inline bool wxPersistentRegisterAndRestore(T *obj) wxPersistentObject * const pers = wxCreatePersistentObject(obj); return wxPersistenceManager::Get().RegisterAndRestore(obj, pers); - + } #endif // _WX_PERSIST_H_ diff --git a/src/common/persist.cpp b/src/common/persist.cpp index 52c4513924..76ab2698bd 100644 --- a/src/common/persist.cpp +++ b/src/common/persist.cpp @@ -40,6 +40,10 @@ wxPersistenceManager& wxPersistenceManager::Get() return s_manager; } +wxPersistenceManager::~wxPersistenceManager() +{ +} + wxString wxPersistenceManager::GetKey(const wxPersistentObject& who, const wxString& name) const