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:
Julian Smart
2001-07-11 20:22:44 +00:00
parent 2774804745
commit aef94d6860
4 changed files with 30 additions and 17 deletions

View File

@@ -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