Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Call tp_clear of base unmanaged type#1541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

lostmsu
Copy link
Member

What does this implement/fix? Explain your changes.

Callstp_clear (if any) of base unmanaged type when a reflected CLR object instance is cleared.

Does this close any currently open issues?

#1476

Any other comments?

C# exceptions inherit from PythonBaseException class, which hastp_clear. Prior to this change it was not called when Python deallocated them leaving dangling references toBaseException.args andBaseException.__cause__.

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change

…ject instance is clearedfixespythonnet#1476 : C# exceptions inherit from Python BaseException class, which has tp_clear. Prior to this change it was not called, leaving dangling references to BaseException.args and BaseException.__cause__.call tp_clear of base unmanaged type when a reflected CLR object instance is clearedfixespythonnet#1476 : C# exceptions inherit from Python BaseException class, which has tp_clear. Prior to this change it was not called, leaving dangling references to BaseException.args and BaseException.__cause__.
@lostmsu
Copy link
MemberAuthor

@amos402 can you review this one?

The 3.7 MacOS CI failure is preexisting:https://github.com/pythonnet/pythonnet/runs/3267749344

@lostmsulostmsu merged commit2ef6b50 intopythonnet:masterSep 14, 2021
@lostmsulostmsu deleted the bugs/MemLeak-CatchingExceptions branchSeptember 14, 2021 19:18
@lostmsulostmsu restored the bugs/MemLeak-CatchingExceptions branchSeptember 14, 2021 19:28
@lostmsulostmsu deleted the bugs/MemLeak-CatchingExceptions branchSeptember 14, 2021 19:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@lostmsu

[8]ページ先頭

©2009-2025 Movatter.jp