Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing managed callbacks to native code through interop #44

Closed
MuffinTastic opened this issue Jan 30, 2023 · 4 comments · May be fixed by #53
Closed

Allow passing managed callbacks to native code through interop #44

MuffinTastic opened this issue Jan 30, 2023 · 4 comments · May be fixed by #53
Assignees
Labels

Comments

@MuffinTastic
Copy link
Contributor

I feel it would be good to be able to make a callback on the managed side, and pass it to the native side. The primary use case for this is the console system, so that everything for actually running commands can be on the native side instead of splitting the system up in weird ways.

@MuffinTastic
Copy link
Contributor Author

The use case I thought up for this is no longer relevant but I figure I'll leave this open in case it's still desirable

@xezno
Copy link
Member

xezno commented Jan 31, 2023

I'll look into this, but I can't say if it's possible / easy: the C# garbage collector likes to move things around; if we get a pointer to a C# function we can't really store it because it might be invalid the next time we want to use it

@peter-r-g
Copy link
Contributor

This is resolved with #58 right?

@xezno
Copy link
Member

xezno commented Sep 17, 2024

Yeah I think so

@xezno xezno closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants