Content-Length: 342881 | pFad | https://github.com/fastplotlib/fastplotlib/pull/467

19 add `References` object to `PlotArea`, other cleanup, better garbage collection by kushalkolar · Pull Request #467 · fastplotlib/fastplotlib · GitHub
Skip to content

add References object to PlotArea, other cleanup, better garbage collection #467

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

Merged
merged 8 commits into from
Apr 2, 2024

Conversation

kushalkolar
Copy link
Member

@kushalkolar kushalkolar commented Mar 31, 2024

closes #463

Adds new References object for which there is a single global instance for one instance of Python.

This helps segregate Graphic, Selector, Legend and any other objects we might want to have in the future.

start using prefix _fpl_* for any attributes/methods that are for fpl internal use only, to distinguish them from actual private attributes

Moved selector _fpl_cleanup to Graphic._fpl_cleanup

Need to add tests for:

@kushalkolar kushalkolar requested a review from clewis7 as a code owner March 31, 2024 10:36
@kushalkolar
Copy link
Member Author

kushalkolar commented Mar 31, 2024

Using the linear region selectors notebook to try adn understand what holds onto references since selectors have lots of events.

image

@kushalkolar
Copy link
Member Author

A base Graphic._fpl_cleanup() that removes all possible event handlers on the renderer and world objects seems to work, tested with LinearRegionSelector

image

@kushalkolar kushalkolar changed the title add References object to PlotArea, other cleanup add References object to PlotArea, other cleanup, better garbage collection Mar 31, 2024
Copy link
Member

@clewis7 clewis7 left a comment

Choose a reason for hiding this comment

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

LGTM, REFERENCES class very elegant

@kushalkolar kushalkolar merged commit bc2de99 into main Apr 2, 2024
@kushalkolar kushalkolar mentioned this pull request Apr 2, 2024
@kushalkolar kushalkolar deleted the plot-area-refactor branch April 11, 2024 01:42
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.

refactor graphic, selector and legend instances dicts in _plot_area
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/fastplotlib/fastplotlib/pull/467

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy