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

Improve method binding#974

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

Closed
koubaa wants to merge11 commits intopythonnet:masterfromkoubaa:ienumerable
Closed
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
improve ref counting
  • Loading branch information
@koubaa
koubaa committedDec 3, 2019
commit96fd89692a7ce74213e08fa6e70163f1dcc4530d
8 changes: 2 additions & 6 deletionssrc/runtime/converter.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -941,22 +941,18 @@ private static bool ToAction(IntPtr value, Type obType, out object result, bool
if (setError) {
SetConversionError(value, obType);
}
obj.Dispose();
return false;
}

Action action = () => {
PyObject py_action = new PyObject(value);
var py_args = new PyObject[0];
var py_result = py_action.Invoke(py_args);

//Discard the result since this is being converted to an Action
py_result.Dispose();
py_action.Dispose();
Runtime.XDecref(value);
};

Runtime.XIncref(value);
result = action;
obj.Dispose();
return true;
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp