Skip to content

DefaultRecentFileService: add dispose method #385

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 1 commit into from
May 25, 2020

Conversation

frauzufall
Copy link
Member

@frauzufall frauzufall commented May 25, 2020

I ran this loop when working on memory issues in SCIFIO:

for (int i = 0; i < 1000; i++) {
	SCIFIO scifio = new SCIFIO(new Context());
	scifio.dispose();
}

It was very slow in comparison to creating the Context with specific services. I narrowed it down to new Context(RecentFileService.class)) and this patch seems to make the RecentFileService clean up properly on dispose.

@ctrueden ctrueden merged commit 308e469 into master May 25, 2020
@ctrueden
Copy link
Member

Good catch!

@ctrueden ctrueden deleted the fix-recentfileservice-dispose branch May 25, 2020 15:54
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.

2 participants