From 48cda2e08e16986d2b5eff8e183ddfc126fe4085 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 21 Dec 2010 06:58:44 +0000 Subject: Plugging up some memory leaks in the Blenderplayer that I found with valgrind --- source/gameengine/VideoTexture/PyTypeList.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/gameengine/VideoTexture/PyTypeList.cpp') diff --git a/source/gameengine/VideoTexture/PyTypeList.cpp b/source/gameengine/VideoTexture/PyTypeList.cpp index 2d571675dbd..c374348da26 100644 --- a/source/gameengine/VideoTexture/PyTypeList.cpp +++ b/source/gameengine/VideoTexture/PyTypeList.cpp @@ -28,6 +28,14 @@ http://www.gnu.org/copyleft/lesser.txt. #include +/// destructor +PyTypeList::~PyTypeList() +{ + // if list exists + if (m_list.get() != NULL) + for (PyTypeListType::iterator it = m_list->begin(); it != m_list->end(); ++it) + delete *it; +} /// check, if type is in list bool PyTypeList::in (PyTypeObject * type) -- cgit v1.2.3