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

Signal disconnection and memory management #17

Open
mappu opened this issue Aug 25, 2024 · 0 comments
Open

Signal disconnection and memory management #17

mappu opened this issue Aug 25, 2024 · 0 comments
Labels

Comments

@mappu
Copy link
Owner

mappu commented Aug 25, 2024

When a signal is connected to a C++ object, the Go side calls cgo.NewHandle() to allocate the callback. When the C++ object is deleted, there's no way for Go to know that it can GC that memory.

It may be possible to find some way to detect object deletion and free associated resources.

There should also be an explicit way to disconnect a signal, both for a user's own purpose, and for the purpose of freeing memory.

@mappu mappu added the wishlist label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant