]>
git.saurik.com Git - wxWidgets.git/blob - src/msw/gdiobj.cpp
ab671b673bc31126903e16b2c42656f7a0a54c7f
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"
26 #include "wx/gdiobj.h"
27 #include "wx/msw/private.h"
29 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
31 #define M_GDIDATA wx_static_cast(wxGDIRefData*, m_refData)
34 void wxGDIObject::IncrementResourceUsage(void)
39 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
40 M_GDIDATA->m_usageCount ++;
43 void wxGDIObject::DecrementResourceUsage(void)
48 M_GDIDATA->m_usageCount --;
50 wxTheApp->SetPendingCleanup(true);
51 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
52 if (M_GDIDATA->m_usageCount < 0)
55 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
58 // assert(M_GDIDATA->m_usageCount >= 0);