diff options
author | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:32:07 +0100 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:32:07 +0100 |
commit | ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252 (patch) | |
tree | 576b1741351e1cd34f0fcce49f98df9c17e10912 /wx+/image_resources.cpp | |
parent | 7.6 (diff) | |
download | FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.tar.gz FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.tar.bz2 FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.zip |
7.7
Diffstat (limited to 'wx+/image_resources.cpp')
-rw-r--r-- | wx+/image_resources.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index 98cdc7a8..4ba62bb9 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -50,12 +50,18 @@ public: } void init(const Zstring& filepath); + void cleanup() + { + bitmaps.clear(); + anims.clear(); + } const wxBitmap& getImage (const wxString& name) const; const wxAnimation& getAnimation(const wxString& name) const; private: GlobalResources() {} + ~GlobalResources() { assert(bitmaps.empty() && anims.empty()); } //don't leave wxWidgets objects for static destruction! GlobalResources (const GlobalResources&) = delete; GlobalResources& operator=(const GlobalResources&) = delete; @@ -127,6 +133,7 @@ const wxAnimation& GlobalResources::getAnimation(const wxString& name) const void zen::initResourceImages(const Zstring& filepath) { GlobalResources::instance().init(filepath); } +void zen::cleanupResourceImages() { GlobalResources::instance().cleanup(); } const wxBitmap& zen::getResourceImage(const wxString& name) { return GlobalResources::instance().getImage(name); } |