Commit 8e82a77c authored by Manuel Günther's avatar Manuel Günther
Browse files

Fixed memory leaks.

parent 97a4c17c
......@@ -75,6 +75,7 @@ static void boostedMachine_exit(
BoostedMachineObject* self
)
{
self->base.reset();
Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
}
......
......@@ -49,6 +49,8 @@ static void jesorskyLoss_exit(
JesorskyLossObject* self
)
{
self->base.reset();
self->parent.base.reset();
Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
}
......
......@@ -131,7 +131,8 @@ static void lutMachine_exit(
LUTMachineObject* self
)
{
// get list of arguments
self->base.reset();
self->parent.base.reset();
Py_TYPE(self)->tp_free((PyObject*)self);
}
......
......@@ -65,6 +65,7 @@ static void lutTrainer_exit(
LUTTrainerObject* self
)
{
self->base.reset();
Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
}
......
......@@ -92,7 +92,8 @@ static void stumpMachine_exit(
StumpMachineObject* self
)
{
// get list of arguments
self->base.reset();
self->parent.base.reset();
Py_TYPE(self)->tp_free((PyObject*)self);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment