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

Consider which objects to register with the ObjectService #55

Open
ctrueden opened this issue Aug 21, 2015 · 0 comments
Open

Consider which objects to register with the ObjectService #55

ctrueden opened this issue Aug 21, 2015 · 0 comments

Comments

@ctrueden
Copy link
Member

Right now, any Data objects get stored in the ObjectService as long as their reference count (number of things displaying them, essentially) is > 0. And when the ref count hits zero, they are removed from the ObjectService. This is because the ObjectService keeps hard references.

We could:

  • Add a feature to the ObjectService to support weak or phantom references. This can eat memory though and delay garbage collection of otherwise-obsolete data.
  • Consider making more things extend Data, particularly Table implementations, which would be nice to have a multiple-choice selection for when they are used as inputs.
  • Generalize the reference counting thing beyond Data if needed.
  • Forget all this reference counting stuff, and enhance the ObjectWidget to look for Display objects in the ObjectService that are currently displaying the needed type—and populate the multiple choices with those objects.

That last option is how I'm currently leaning, without having thought or investigated thoroughly enough to be sure I'm remembering how everything works 100% correctly. Would need to be sure things still work headless, though, if nothing is being displayed.

@ctrueden ctrueden added this to the unscheduled milestone Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant