FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use Py_CLEAR · sdpython/pythonnet@b35f441 · GitHub

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

Repository navigation

Commit b35f441

Browse files
committed
Use Py_CLEAR
Addresses comment: pythonnet#958
1 parent 1ecdce8 commit b35f441

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/runtime/methodobject.cs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ internal bool IsStatic()
113113

114114
private void ClearMembers()
115115
{
116-
Runtime.XDecref(doc);
117-
doc = IntPtr.Zero;
116+
Runtime.Py_CLEAR(ref doc);
118117
if (unbound != null)
119118
{
120119
Runtime.XDecref(unbound.pyHandle);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL