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