Skip to content

Commit

Permalink
Free memory after running updater
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzchen committed Jul 20, 2023
1 parent e24bcf0 commit 9108e5c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions standalone/pyunity-editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ int main(int argc, char **argv) {
CHECK_ERROR();
PyObject_CallFunction(func, NULL);
CHECK_ERROR();
}

PyObject *editor = PyImport_ImportModule("pyunity_editor.cli");
CHECK_ERROR();
} else {
PyObject *editor = PyImport_ImportModule("pyunity_editor.cli");
CHECK_ERROR();

#ifdef NOCONSOLE
PyObject *func = PyObject_GetAttrString(editor, "gui");
#else
PyObject *func = PyObject_GetAttrString(editor, "run");
#endif
CHECK_ERROR();
#ifdef NOCONSOLE
PyObject *func = PyObject_GetAttrString(editor, "gui");
#else
PyObject *func = PyObject_GetAttrString(editor, "run");
#endif
CHECK_ERROR();

PyObject_CallFunction(func, NULL);
CHECK_ERROR();
PyObject_CallFunction(func, NULL);
CHECK_ERROR();
}

if (Py_FinalizeEx() < 0) {
exit(1);
Expand Down

0 comments on commit 9108e5c

Please sign in to comment.