Plugging up some memory leaks in the Blenderplayer that I found with valgrind

This commit is contained in:
Mitchell Stokes 2010-12-21 06:58:44 +00:00
parent 9d289c602d
commit 48cda2e08e
4 changed files with 17 additions and 2 deletions

@ -802,7 +802,6 @@ void GPG_Application::exitEngine()
m_canvas = 0;
}
IMB_exit();
GPU_extensions_exit();
m_exitRequested = 0;

@ -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;
}

@ -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)

@ -41,6 +41,9 @@ typedef std::vector<PyTypeListItem*> PyTypeListType;
class PyTypeList
{
public:
/// destructor
~PyTypeList();
/// check, if type is in list
bool in (PyTypeObject * type);