Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1427ac

Browse files
committed
increfs in OnSave are no longer necessary with the new references
1 parent 32c4bb6 commit a1427ac

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

src/runtime/clrobject.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ internal static CLRObject Restore(object ob, BorrowedReference pyHandle, InterDo
7777
return co;
7878
}
7979

80-
protected override void OnSave(InterDomainContext context)
81-
{
82-
base.OnSave(context);
83-
Runtime.XIncref(pyHandle);
84-
}
85-
8680
protected override void OnLoad(InterDomainContext context)
8781
{
8882
base.OnLoad(context);

src/runtime/methodobject.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,5 @@ protected override void Clear(BorrowedReference ob)
213213
ClearObjectDict(this.pyHandle);
214214
base.Clear(ob);
215215
}
216-
217-
protected override void OnSave(InterDomainContext context)
218-
{
219-
base.OnSave(context);
220-
if (unbound != null)
221-
{
222-
Runtime.XIncref(unbound.pyHandle);
223-
}
224-
Runtime.XIncref(doc);
225-
}
226216
}
227217
}

0 commit comments

Comments
 (0)