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

Properly dispose of contexts #12

Open
hinerm opened this issue Dec 19, 2014 · 2 comments
Open

Properly dispose of contexts #12

hinerm opened this issue Dec 19, 2014 · 2 comments

Comments

@hinerm
Copy link
Member

hinerm commented Dec 19, 2014

Currently none of the tutorials dispose the Contexts they create. I'm worried that this will lead to "ImageJ tutorials won't quit" issues. For example: run the LoadAndDisplayDataset tutorial - after closing the opened image and log, imagej will still be running.

@hinerm
Copy link
Member Author

hinerm commented Dec 19, 2014

It is possible that we could solve this as a higher level... I assume it is still due to the polling thread set up by SCIFIO... but I couldn't come up with a better solution last time I tried, and I feel like maybe the tutorials are a good place to talk about context disposal anyway..?

@ctrueden
Copy link
Member

For non-interactive tutorials, calling context.dispose() at the end is probably the correct thing to do.

For interactive tutorials, the UI comes up and they'll have to choose Quit or close the window anyway in order to quit, which should dispose the context.

The only tricky scenario is if an image window pops up without the main UI being shown—then what?

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

2 participants