Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed PythonException leak
  • Loading branch information
amos402 authored and Martin-Molinero committed Mar 27, 2019
commit 338dcc184ae3876623445fc833b79e8fe0bd2f98
2 changes: 1 addition & 1 deletion src/runtime/finalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private void AddPendingCollect()

private int OnPendingCollect(IntPtr arg)
{
Collect();
DisposeAll();
_pending = false;
return 0;
}
Expand Down
3 changes: 0 additions & 3 deletions src/runtime/pythonexception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ public PythonException()
{
IntPtr gs = PythonEngine.AcquireLock();
Runtime.PyErr_Fetch(ref _pyType, ref _pyValue, ref _pyTB);
Runtime.XIncref(_pyType);
Runtime.XIncref(_pyValue);
Runtime.XIncref(_pyTB);
if (_pyType != IntPtr.Zero && _pyValue != IntPtr.Zero)
{
string type;
Expand Down