]>
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
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #include "wx/gdiobj.h"
27 #include "wx/msw/private.h"
29 #define M_GDIDATA static_cast<wxGDIRefData*>(m_refData)
32 void wxGDIObject::IncrementResourceUsage(void)
37 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
38 M_GDIDATA->m_usageCount ++;
41 void wxGDIObject::DecrementResourceUsage(void)
46 M_GDIDATA->m_usageCount --;
48 wxTheApp->SetPendingCleanup(true);
49 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
50 if (M_GDIDATA->m_usageCount < 0)
53 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
56 // assert(M_GDIDATA->m_usageCount >= 0);