]>
git.saurik.com Git - wxWidgets.git/blob - src/msw/gdiobj.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGDIObject class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "gdiobj.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
31 #include "wx/gdiobj.h"
32 #include "wx/msw/private.h"
34 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
37 void wxGDIObject::IncrementResourceUsage(void)
42 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
43 M_GDIDATA->m_usageCount ++;
46 void wxGDIObject::DecrementResourceUsage(void)
51 M_GDIDATA->m_usageCount --;
53 wxTheApp->SetPendingCleanup(TRUE);
54 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
55 if (M_GDIDATA->m_usageCount < 0)
58 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
61 // assert(M_GDIDATA->m_usageCount >= 0);