Transfer the ownership of method's thunk to caller(split from #958)#1003
Transfer the ownership of method's thunk to caller(split from #958)#1003filmor merged 8 commits intopythonnet:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1003 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 1 1
Lines 301 301
=======================================
Hits 261 261
Misses 40 40
Continue to review full report at Codecov.
|
|
Is there a reason why we are not using |
|
Usually I also use |
|
@amos402 Do you think you can update this PR to make use of |
filmor
left a comment
There was a problem hiding this comment.
I think this can be simplified further in the future, but it's definitely better than it was before :)
…et#958) (pythonnet#1003) * Add exception helper * Make the caller of `Interop.GetThunk` handle thunk's lifecycle(unfinished) * Use Marshal.GetFunctionPointerForDelegate instead of Marshal + Thunk
What does this implement/fix? Explain your changes.
Let the caller handle the lifecycle for achieving the memory release when shutdown pythonnet regardless of normal shutdown or soft shutdown in #958.
Does this close any currently open issues?
...
Any other comments?
...
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG