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

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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

Merged
kushalkolar merged 8 commits into
mainfrom
plot-area-refactor
Apr 2, 2024
Merged

add References object to PlotArea, other cleanup, better garbage collection#467
kushalkolar merged 8 commits into
mainfrom
plot-area-refactor

Conversation

kushalkolar commented Mar 31, 2024
edited
Loading

Copy link
Copy Markdown
Member

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 requested a review from clewis7 as a code owner March 31, 2024 10:36

kushalkolar commented Mar 31, 2024
edited
Loading

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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

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

clewis7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM, REFERENCES class very elegant

Comment thread fastplotlib/graphics/_base.py Show resolved Hide resolved
Comment thread fastplotlib/graphics/_base.py Show resolved Hide resolved
Comment thread fastplotlib/graphics/_base.py Show resolved Hide resolved
Comment thread fastplotlib/graphics/selectors/_base_selector.py Show resolved Hide resolved
kushalkolar merged commit bc2de99 into main Apr 2, 2024
kushalkolar mentioned this pull request Apr 2, 2024
kushalkolar deleted the plot-area-refactor branch April 11, 2024 01:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.