| Summary: | Description Scanner Info doesn't release ICProjectDescription | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marko Tomljenovic <marko.tomljenovic> | ||||||
| Component: | cdt-core | Assignee: | Andrew Gvozdev <angvoz.dev> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Andrew Gvozdev <angvoz.dev> | ||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | jamesblackburn+eclipse, yevshif | ||||||
| Version: | 7.0.1 | ||||||||
| Target Milestone: | 8.1.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marko Tomljenovic
Created attachment 185621 [details]
Screenshot of heap dump after aout of memory
Can you provide a simplified test case which leaks the listener? Created attachment 193038 [details]
Leak Report from Memory Analyzer
I did another test where I imported 15 projects in sequence. In the leak.png pic it can be seen that there are 15 XMLStorage objects that are not cleared when a project is removed.
In addition there are also 5 objects of type CCOnfigurationDescriptionCache that are also not cleared.
I will do my best to provide a test case for this problem but it is very hard to do so.
The problem is that everybody can register itself as a ICProjectDescriptionListener using CProjectDescriptionManager.addCProjectDescriptionListener(). The only way to prevent a memory leak here without chaning the API is that all listener must listen to project remove/close/move events and deregister itself properly. A nicer way would be if the description managers api could be changed in a way so that listeners are registered for project so that the manager can remove them automatically when a project is removed,... I am experiencing that too. I can see 2 listeners that are being leaked, ScannerInfoProviderProxy and DescriptionScannerInfoProvider which is added during build. Committed changes to master, could you verify that it resolves the memory leak? *** cdt git genie on behalf of 333001 ***
bug 333001: Description Scanner Info doesn't release
ICProjectDescription
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=63f72f39e12c968bbfe3ec7c158de43936ec48de
There is one more leak in this scenario, CModelManager.binaryMap. Fixed on master as well. *** cdt git genie on behalf of 333001 ***
bug 333001: Description Scanner Info doesn't release
ICProjectDescription
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=f0d815e69e59901c1c9fd1e33a7870286b244675
This bug seems to be appearing again in 8.0.1. Can somebody pls check it out? There was no claim that it was fixed in 8.0.1. The fix was done on master only (9.0). (In reply to comment #11) > There was no claim that it was fixed in 8.0.1. The fix was done on master only > (9.0). Oh yeah, you are right! I am sorry for the inconvenience. Closing bug then. |