Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-16 09:10:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-16 09:10:58 +0400
commitb1403415aed7787a03373f48b2d57dc2e9b6e316 (patch)
treeef9a7cf186a09e756c2a6325a6c14617719d21ad
parentbbc1945f36635fdc3cd0adea69dc3d47e6963ba1 (diff)
fix [#36157] Memory Leak in GHOST_DropTargetX11
would leak a little bit of memory for every window created.
-rw-r--r--intern/ghost/intern/GHOST_DropTargetWin32.h4
-rw-r--r--intern/ghost/intern/GHOST_DropTargetX11.cpp3
-rw-r--r--intern/ghost/intern/GHOST_DropTargetX11.h4
3 files changed, 11 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h
index f746a50d469..56bae1fd1b2 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.h
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.h
@@ -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__
diff --git a/intern/ghost/intern/GHOST_DropTargetX11.cpp b/intern/ghost/intern/GHOST_DropTargetX11.cpp
index e2e15277a99..df500122449 100644
--- a/intern/ghost/intern/GHOST_DropTargetX11.cpp
+++ b/intern/ghost/intern/GHOST_DropTargetX11.cpp
@@ -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)
diff --git a/intern/ghost/intern/GHOST_DropTargetX11.h b/intern/ghost/intern/GHOST_DropTargetX11.h
index 3fed5798611..0254139bcd8 100644
--- a/intern/ghost/intern/GHOST_DropTargetX11.h
+++ b/intern/ghost/intern/GHOST_DropTargetX11.h
@@ -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__