forked from bartvdbraak/blender
Plugging up some memory leaks in the Blenderplayer that I found with valgrind
This commit is contained in:
parent
9d289c602d
commit
48cda2e08e
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user