]>
git.saurik.com Git - wxWidgets.git/blob - src/msw/gdiobj.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/gdiobj.cpp
3 // Purpose: wxGDIObject class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
19 #include "wx/gdiobj.h"
28 #include "wx/msw/private.h"
30 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
32 #define M_GDIDATA wx_static_cast(wxGDIRefData*, m_refData)
35 void wxGDIObject::IncrementResourceUsage(void)
40 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
41 M_GDIDATA->m_usageCount ++;
44 void wxGDIObject::DecrementResourceUsage(void)
49 M_GDIDATA->m_usageCount --;
51 wxTheApp->SetPendingCleanup(true);
52 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
53 if (M_GDIDATA->m_usageCount < 0)
56 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
59 // assert(M_GDIDATA->m_usageCount >= 0);