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

Fix/memory leak in package case checker #685

Merged
merged 2 commits into from
Jun 16, 2020

Conversation

xdecock
Copy link

@xdecock xdecock commented May 16, 2020

Multiple optimisations and a fix of the memory leak created when a lot of classes have the same basename.

@xdecock xdecock changed the base branch from master to dev May 16, 2020 15:27
@xdecock xdecock force-pushed the fix/memory-leak-in-PackageCaseChecker branch from 3ed8d1a to 806fb4c Compare May 16, 2020 15:27
@KamasamaK KamasamaK requested a review from ryaneberly May 16, 2020 19:02
final String key = componentName.toLowerCase();
if (!expressionCheckRegister.containsKey(key)) {
expressionCheckRegister.put(key, new ArrayList<PackageCaseCheckerEntry>());
if (!fromExpressionRegister) {
Copy link
Author

Choose a reason for hiding this comment

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

The most important part of the fix, is here, to avoid injecting the same expression multiple times, the rest was just "optimization while trying to understand what was going on"

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the hard work. Looks good at a high level -and I'm trusting the unit tests :)

@ryaneberly ryaneberly merged commit 74fd99c into cflint:dev Jun 16, 2020
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