Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit ee15bf4

Browse files
committed
Fix reference counting bug in Converter.ToPython.
1 parent 66f0449 commit ee15bf4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/runtime/converter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ internal static IntPtr ToPython(Object value, Type type) {
179179
foreach (object o in (IEnumerable)value) {
180180
resultlist.Append(new PyObject(ToPython(o, o.GetType())));
181181
}
182+
Runtime.Incref(resultlist.Handle);
182183
return resultlist.Handle;
183184
}
184185

0 commit comments

Comments
 (0)