-
Notifications
You must be signed in to change notification settings - Fork 83
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
Clean caches upon deletion of a Target Definition #1246 #1247
Clean caches upon deletion of a Target Definition #1246 #1247
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @basilevs for this fix.
In general it looks reasonable to me, but after a quick check of the callers I think we have to check in detail if TargetPlatformPreferencePage.handleRemove/performOk()
needs adjustments to ensure a target is not prematurely removed from the map.
I can can help with that this evening.
12bde3a
to
cacd81a
Compare
TargetPlatformHelper and TargetPlatformService keep separate caches for target definition, resulting in a leak of TargetDefinition objects. The leak happens when TargetDefinition.resolve() caches data in TargetPlatformHelper. This also allows to skip the explicit removal of a target selected for removal from the TargetPlatformHelper's cache in TargetPlatformPreferencePage.handleRemove() because the removal will done when the change is applied and TargetPlatformService.deleteTarget() is then called. Fixes eclipse-pde#1246
cacd81a
to
145a426
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it looks reasonable to me, but after a quick check of the callers I think we have to check in detail if
TargetPlatformPreferencePage.handleRemove/performOk()
needs adjustments to ensure a target is not prematurely removed from the map.
I checked the preference-page in detail and the call to TargetPlatformHelper.getTargetDefinitionMap().remove()
in TargetPlatformPreferencePage.handleRemove
can be removed since it will be called in performOk()
with the removed targets when TargetPlatformService.deleteTarget()
is called.
I applied that already so that this change can be submitted as soon as the build completes.
Thank you for this contribution.
Not for Cancel? |
Yes if the dialog is canceled |
For some of the test-classes the test cases are not found and zero tests are executed ...
I'll investigate that. |
Looks like I disabled those tests in #745 (comment) since they have to be reworked to be able to run in I-builds. Lines 75 to 77 in e41da13
I'll have a look at it. |
TargetPlatformHelper and TargetPlatformService keep separate caches for target definition, resulting in a leak of TargetDefinition objects.
The leak happens when TargetDefinition.resolve() caches data in TargetPlatformHelper.
Fixes #1246