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

Use std::unique_ptr for memory managment of readers #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hmacdope
Copy link
Member

This allows us to remove cinit and dealloc methods from the cython classes due to automated reference counting, but has the annoying side effect that cython . syntax for pointer access doesn't work and we have to use `.get().XX to access pointer methods.

I'll let you decide if this is worth it or not @richardjgowers

@hmacdope hmacdope linked an issue Jul 16, 2024 that may be closed by this pull request
Copy link
Member

@richardjgowers richardjgowers left a comment

Choose a reason for hiding this comment

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

We've pretty much inlined the unique ptr functionality with the cinit dealloc methods, so as a delta this adds a layer of annoyance with the get method? I agree if we were going full library with omni then maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't return raw pointers to readers with GetReader
2 participants