fix [#36157] Memory Leak in GHOST_DropTargetX11

would leak a little bit of memory for every window created.
This commit is contained in:
Campbell Barton
2013-07-16 05:10:58 +00:00
parent bbc1945f36
commit b1403415ae
3 changed files with 11 additions and 0 deletions

View File

@@ -152,6 +152,10 @@ private:
GHOST_SystemWin32 *m_system;
/* Data type of the dragged object */
GHOST_TDragnDropTypes m_draggedObjectType;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetWin32")
#endif
};
#endif // __GHOST_DROPTARGETWIN32_H__

View File

@@ -84,6 +84,9 @@ void GHOST_DropTargetX11::Initialize(void)
void GHOST_DropTargetX11::Uninitialize(void)
{
xdnd_shut(&m_dndClass);
delete[] m_dndActions;
delete[] m_dndTypes;
}
GHOST_DropTargetX11::GHOST_DropTargetX11(GHOST_WindowX11 *window, GHOST_SystemX11 *system)

View File

@@ -130,6 +130,10 @@ private:
/* counter of references to global XDND structures */
static int m_refCounter;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetX11")
#endif
};
#endif // __GHOST_DROPTARGETX11_H__