| Summary: | CMacroExpansionInput is referenced even if macro expansion is closed, wasting memory | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc-André Laperle <malaperle> |
| Component: | cdt-editor | Assignee: | Anton Leherbauer <aleherb+eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | Anton Leherbauer <aleherb+eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.0.1 | ||
| Target Milestone: | 8.1.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
(In reply to comment #0) > I think either the InformationControls should be closed and recreated every > time or the input should be nulled out. The information controls are managed by the hover manager and cannot be disposed at will, but nulling the input when the controls are hidden makes sense. I have done that in the master branch and verified that no CMacroExpansionInputs remains referenced. (In reply to comment #1) > (In reply to comment #0) > > I think either the InformationControls should be closed and recreated every > > time or the input should be nulled out. > > The information controls are managed by the hover manager and cannot be > disposed at will, Yeah, I had in mind modifying the hover manager but nulling the input works well. > I have done that in the master branch and verified that no > CMacroExpansionInputs remains referenced. Thanks! I haven't seen any CMacroExpansionInput references since I applied the fix yesterday. *** cdt git genie on behalf of Anton Leherbauer ***
Bug 369350 - CMacroExpansionInput is referenced even if macro expansion is closed, wasting memory
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8df0648343ce6283e92a6dd0c3eb6380a614a4cc
|
Tested with 8.0.1 and master (2012-01-22) 1. Open several files with this code: #define FOO(a) int a; #define BAR(a) FOO(a); int main() { BAR(myInt) } 2. Hover over the second 'BAR' to get macro expansion steps. Do this in every file. *Do not close the files in the process* 3. Run GC. 4. Open Eclipse Memory Analyzer, acquire dump. 5. Open Dominator Tree, type CMacro in regex. 6. Notice several CMacroExpansionInputs still being referenced. In a small project and small macro expansion, this is hardly noticeable. But when working on a large project with many files opened, I've seen this take 100MB+. I think either the InformationControls should be closed and recreated every time or the input should be nulled out.