mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Memory leak
This commit is contained in:
parent
12493d6324
commit
682e5608e7
@ -98,6 +98,7 @@ set_data(void *data) {
|
||||
#ifdef HAVE_PYTHON
|
||||
INLINE void OdeBody::
|
||||
set_data(PyObject *data) {
|
||||
Py_XDECREF((PyObject*) dBodyGetData(_id));
|
||||
Py_XINCREF(data);
|
||||
dBodySetData(_id, data);
|
||||
}
|
||||
|
@ -34,6 +34,9 @@ OdeBody::
|
||||
|
||||
void OdeBody::
|
||||
destroy() {
|
||||
#ifdef HAVE_PYTHON
|
||||
Py_XDECREF((PyObject*) dBodyGetData(_id));
|
||||
#endif
|
||||
nassertv(_id);
|
||||
dBodyDestroy(_id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user