Plugging up some memory leaks in the Blenderplayer that I found with valgrind
This commit is contained in:
@@ -802,7 +802,6 @@ void GPG_Application::exitEngine()
|
|||||||
m_canvas = 0;
|
m_canvas = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMB_exit();
|
|
||||||
GPU_extensions_exit();
|
GPU_extensions_exit();
|
||||||
|
|
||||||
m_exitRequested = 0;
|
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;
|
return error ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
@@ -28,6 +28,14 @@ http://www.gnu.org/copyleft/lesser.txt.
|
|||||||
|
|
||||||
#include <PyObjectPlus.h>
|
#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
|
/// check, if type is in list
|
||||||
bool PyTypeList::in (PyTypeObject * type)
|
bool PyTypeList::in (PyTypeObject * type)
|
||||||
|
@@ -41,6 +41,9 @@ typedef std::vector<PyTypeListItem*> PyTypeListType;
|
|||||||
class PyTypeList
|
class PyTypeList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/// destructor
|
||||||
|
~PyTypeList();
|
||||||
|
|
||||||
/// check, if type is in list
|
/// check, if type is in list
|
||||||
bool in (PyTypeObject * type);
|
bool in (PyTypeObject * type);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user