Solved py finalize bug on py loader.
@@ -299,7 +299,6 @@ void function_py_interface_destroy(function func, function_impl impl)
{
if (py_func->values[iterator] != NULL)
{
- /*
PyGILState_STATE gstate;
gstate = PyGILState_Ensure();
@@ -307,11 +306,9 @@ void function_py_interface_destroy(function func, function_impl impl)
Py_DECREF(py_func->values[iterator]);
PyGILState_Release(gstate);
- */
}
}
-
free(py_func->values);
}
@@ -889,7 +886,6 @@ int py_loader_impl_destroy(loader_impl impl)
Py_DECREF(py_impl->main_module);
- /* TODO: Resolve GC error on finalize */
if (Py_IsInitialized() != 0)
{
if (PyErr_Occurred() != NULL)
@@ -899,7 +895,7 @@ int py_loader_impl_destroy(loader_impl impl)
PyGILState_Release(gstate);
- /*Py_Finalize();*/
+ Py_Finalize();
}
else
{
