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

fix reference counting for Python function objects #1589

Open
stevengj opened this issue Jun 3, 2021 · 1 comment
Open

fix reference counting for Python function objects #1589

stevengj opened this issue Jun 3, 2021 · 1 comment
Labels

Comments

@stevengj
Copy link
Collaborator

stevengj commented Jun 3, 2021

When Python function objects are passed to Meep, we really need to properly increment/decrement the reference count, e.g. here.

This may mean having some pointer-wrapper class that has virtual constructors, copy constructors, etcetera, that we can use in place of void *user_data pointers, and overload in the Python interface to use incref/decref.

@stevengj stevengj added the bug label Jun 3, 2021
@stevengj
Copy link
Collaborator Author

stevengj commented Jun 3, 2021

(Alternatively, we could use C++ closures everywhere, but that is a more invasive change.)

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