| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 802a43a commit 0fdf969
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -297,7 +297,7 @@ public static void tp_dealloc(IntPtr ob) | |||
| 297 | 297 | public static int tp_clear(IntPtr ob) | |
| 298 | 298 | { | |
| 299 | 299 | ManagedType self = GetManagedObject(ob); | |
| 300 | - if (self.pyHandle != self.tpHandle) | ||
| 300 | + if (!self.IsTypeObject()) | ||
| 301 | 301 | { | |
| 302 | 302 | ClearObjectDict(ob); | |
| 303 | 303 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -136,6 +136,11 @@ internal static bool IsManagedType(IntPtr ob) | |||
| 136 | 136 | return false; | |
| 137 | 137 | } | |
| 138 | 138 | ||
| 139 | + public bool IsTypeObject() | ||
| 140 | + { | ||
| 141 | + return pyHandle == tpHandle; | ||
| 142 | + } | ||
| 143 | + | ||
| 139 | 144 | internal static IDictionary<ManagedType, TrackTypes> GetManagedObjects() | |
| 140 | 145 | { | |
| 141 | 146 | return _managedObjs; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments