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

Transfer the ownership of method's thunk to caller(split from #958)#1003

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
filmor merged 8 commits intopythonnet:masterfromamos402:release-thunk
Dec 18, 2019

Conversation

amos402
Copy link
Member

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.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Add yourself toAUTHORS
  • Updated theCHANGELOG

@codecov-io
Copy link

codecov-io commentedNov 30, 2019
edited
Loading

Codecov Report

Merging#1003 intomaster willnot change coverage.
The diff coverage isn/a.

Impacted file tree graph

@@           Coverage Diff           @@##           master    #1003   +/-   ##=======================================  Coverage   86.71%   86.71%           =======================================  Files           1        1             Lines         301      301           =======================================  Hits          261      261             Misses         40       40
FlagCoverage Δ
#setup_linux65.44% <ø> (ø)⬆️
#setup_windows71.42% <ø> (ø)⬆️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updatec1190f4...3d2d2b6. Read thecomment docs.

@lostmsu
Copy link
Member

lostmsu commentedDec 3, 2019
edited
Loading

Is there a reason why we are not usingMarshal.GetFunctionPointerForDelegate function instead ofMarshal +Thunk struct manipulation?

filmor reacted with thumbs up emoji

@amos402
Copy link
MemberAuthor

Usually I also useMarshal.GetFunctionPointerForDelegate too. If my suspicion corrected, this historic code was written for .net1.x whenMarshal.GetFunctionPointerForDelegate doesn't exists.
As for now, we can simply cover it byMarshal.GetFunctionPointerForDelegate.

@filmor
Copy link
Member

@amos402 Do you think you can update this PR to make use ofMarshal.GetFunctionPointerForDelegate? That would probably simplify the code quite a bit.

Copy link
Member

@filmorfilmor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think this can be simplified further in the future, but it's definitely better than it was before :)

@filmorfilmor merged commitf0e9c38 intopythonnet:masterDec 18, 2019
AlexCatarino pushed a commit to QuantConnect/pythonnet that referenced this pull requestJun 27, 2020
…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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@filmorfilmorfilmor approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@amos402@codecov-io@lostmsu@filmor

[8]ページ先頭

©2009-2025 Movatter.jp