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

Remove "forget=True" from user API #17

Open
wesm opened this issue Jun 8, 2016 · 1 comment
Open

Remove "forget=True" from user API #17

wesm opened this issue Jun 8, 2016 · 1 comment

Comments

@wesm
Copy link
Collaborator

wesm commented Jun 8, 2016

This should be handled as part of tp_dealloc for this object (or, in the interim, set forget = True by default). Or is there a use case for forget=False that I'm missing?

https://github.com/wiseio/paratext/blob/master/python/paratext/core.py#L207

@deads
Copy link
Contributor

deads commented Jun 9, 2016

The forget parameter should be True in almost all cases to avoid doubling the peak memory. I agree its probably not a detail the user should see.

The only use case for forget=False is low-level testing where you may want to traverse the C++ scratch space more than once.

The problem with tp_dealloc is if you wait until the Python object is destructed to delete the column in C++, the peak memory is much higher than it needs to be.

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

No branches or pull requests

2 participants