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

Collection not garbage collected properly #78

Open
klieret opened this issue May 7, 2021 · 2 comments
Open

Collection not garbage collected properly #78

klieret opened this issue May 7, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@klieret
Copy link
Owner

klieret commented May 7, 2021

As we saw in #75, due to the nested structure of the Collection that keeps references to itself via the AnkiDataFrames that it posesses in __items and __original_items, it does not get garbage collected when it goes out of scope. Only when __items and __original_items are manually deleted, the GC gets triggered.

This is likely not a practical issue, but it's not nice either.

@klieret klieret added the bug Something isn't working label May 7, 2021
@klieret klieret self-assigned this May 7, 2021
@klieret
Copy link
Owner Author

klieret commented May 7, 2021

this can likely be resolved by using weakrefs

@klieret
Copy link
Owner Author

klieret commented May 11, 2021

Perhaps it would even be better to completely avoid an AnkiDataFrame having to implicitly access the Collection, because this doesn't really make sense from a structure point of view. Rather, the Collection could be explicitly used in the interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant