");
}
- protected override void Dealloc()
- {
- tp_clear(this.pyHandle);
- base.Dealloc();
- }
-
public static int tp_traverse(IntPtr ob, IntPtr visit, IntPtr arg)
{
var self = (ModuleObject)GetManagedObject(ob);
@@ -314,17 +308,16 @@ public static int tp_traverse(IntPtr ob, IntPtr visit, IntPtr arg)
return 0;
}
- public static int tp_clear(IntPtr ob)
+ protected override void Clear()
{
- var self = (ModuleObject)GetManagedObject(ob);
- Runtime.Py_CLEAR(ref self.dict);
- ClearObjectDict(ob);
- foreach (var attr in self.cache.Values)
+ Runtime.Py_CLEAR(ref this.dict);
+ ClearObjectDict(this.pyHandle);
+ foreach (var attr in this.cache.Values)
{
Runtime.XDecref(attr.pyHandle);
}
- self.cache.Clear();
- return 0;
+ this.cache.Clear();
+ base.Clear();
}
protected override void OnSave(InterDomainContext context)
diff --git a/src/runtime/overload.cs b/src/runtime/overload.cs
index 48fabca4a..8222dc136 100644
--- a/src/runtime/overload.cs
+++ b/src/runtime/overload.cs
@@ -58,10 +58,10 @@ public static IntPtr tp_repr(IntPtr op)
return doc;
}
- protected override void Dealloc()
+ protected override void Clear()
{
Runtime.Py_CLEAR(ref this.target);
- base.Dealloc();
+ base.Clear();
}
}
}
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy