Skip to content

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

3 participants