projects
/
blender-staging.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d289c6
)
Plugging up some memory leaks in the Blenderplayer that I found with valgrind
author
Mitchell Stokes <mogurijin@gmail.com>
Tue, 21 Dec 2010 06:58:44 +0000
(06:58 +0000)
committer
Mitchell Stokes <mogurijin@gmail.com>
Tue, 21 Dec 2010 06:58:44 +0000
(06:58 +0000)
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
patch
|
blob
|
history
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
patch
|
blob
|
history
source/gameengine/VideoTexture/PyTypeList.cpp
patch
|
blob
|
history
source/gameengine/VideoTexture/PyTypeList.h
patch
|
blob
|
history
diff --git
a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 197e31af1886d1dfe13d13cf64d7cd5239a2551a..d1dee0521730ac1e25616cf2ac27f10e4db6c6c4 100644
(file)
--- a/
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@
-802,7
+802,6
@@
void GPG_Application::exitEngine()
m_canvas = 0;
}
- IMB_exit();
GPU_extensions_exit();
m_exitRequested = 0;
diff --git
a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index d9aaa56b19e93ae24e2f7d5efb0cb0a44d69dc5f..b7f4cacf5ab4c7061232cf952cc6c7451380b8b0 100644
(file)
--- a/
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@
-943,7
+943,12
@@
int main(int argc, char** argv)
}
}
- free_nodesystem();
+ // Cleanup
+ RNA_exit();
+ BLF_exit();
+ free_blender();
+
+ SYS_DeleteSystem(syshandle);
return error ? -1 : 0;
}
diff --git
a/source/gameengine/VideoTexture/PyTypeList.cpp
b/source/gameengine/VideoTexture/PyTypeList.cpp
index 2d571675dbd834ce0d222be587131af9f53344d9..c374348da26f681a77b7b6c3f24461971c746705 100644
(file)
--- a/
source/gameengine/VideoTexture/PyTypeList.cpp
+++ b/
source/gameengine/VideoTexture/PyTypeList.cpp
@@
-28,6
+28,14
@@
http://www.gnu.org/copyleft/lesser.txt.
#include <PyObjectPlus.h>
+/// 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)
diff --git
a/source/gameengine/VideoTexture/PyTypeList.h
b/source/gameengine/VideoTexture/PyTypeList.h
index 4daf88bfa19efd2dfda729d655ec5fc74b06dd73..8ca1e976de75c2e93b372df6d585b319e6f19b92 100644
(file)
--- a/
source/gameengine/VideoTexture/PyTypeList.h
+++ b/
source/gameengine/VideoTexture/PyTypeList.h
@@
-41,6
+41,9
@@
typedef std::vector<PyTypeListItem*> PyTypeListType;
class PyTypeList
{
public:
+ /// destructor
+ ~PyTypeList();
+
/// check, if type is in list
bool in (PyTypeObject * type);