]>
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 and Markus Holzem
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 #if !USE_SHARED_LIBRARIES
36 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
40 void wxGDIObject::IncrementResourceUsage(void)
45 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
46 M_GDIDATA->m_usageCount ++;
49 void wxGDIObject::DecrementResourceUsage(void)
54 M_GDIDATA->m_usageCount --;
56 wxTheApp->SetPendingCleanup(TRUE);
57 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
58 if (M_GDIDATA->m_usageCount < 0)
61 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
64 // assert(M_GDIDATA->m_usageCount >= 0);