]>
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"
35 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
38 void wxGDIObject::IncrementResourceUsage(void)
43 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
44 M_GDIDATA->m_usageCount ++;
47 void wxGDIObject::DecrementResourceUsage(void)
52 M_GDIDATA->m_usageCount --;
54 wxTheApp->SetPendingCleanup(TRUE);
55 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
56 if (M_GDIDATA->m_usageCount < 0)
59 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
62 // assert(M_GDIDATA->m_usageCount >= 0);