Made DC cacheing less obstrusive
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
|
||||
#include "wx/sysopt.h"
|
||||
#include "wx/dcprint.h"
|
||||
#include "wx/module.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
@@ -1985,6 +1986,19 @@ void wxDC::ClearCache()
|
||||
sm_dcCache.DeleteContents(FALSE);
|
||||
}
|
||||
|
||||
// Clean up cache at app exit
|
||||
class wxDCModule : public wxModule
|
||||
{
|
||||
public:
|
||||
virtual bool OnInit() { return TRUE; }
|
||||
virtual void OnExit() { wxDC::ClearCache(); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxDCModule)
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxDCModule, wxModule)
|
||||
|
||||
#endif
|
||||
// wxUSE_DC_CACHEING
|
||||
|
||||
|
Reference in New Issue
Block a user