]>
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 /////////////////////////////////////////////////////////////////////////////
12 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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
)
36 wxGDIObject::wxGDIObject()
42 void wxGDIObject::IncrementResourceUsage(void)
47 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
48 M_GDIDATA->m_usageCount ++;
51 void wxGDIObject::DecrementResourceUsage(void)
56 M_GDIDATA->m_usageCount --;
58 wxTheApp->SetPendingCleanup(TRUE);
59 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
60 if (M_GDIDATA->m_usageCount < 0)
63 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
66 // assert(M_GDIDATA->m_usageCount >= 0);