Bug 74593 - [implementation] Leaking Line objects
Summary: [implementation] Leaking Line objects
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2004-09-22 12:11 EDT by Jerome Lanneluc CLA
Modified: 2006-09-27 07:45 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2004-09-22 12:11:15 EDT
I200409212000

Running under a memory profiler, I edited the class 
org.eclipse.jdt.internal.codeassist.CompletionEngine for several minutes (I 
was qualifying all reference to fiels with "this.").
The memory profiler indicates that 623 527 instances of 
org.eclipse.jface.text.Line are kept in memory retaining almost 15MB.
Comment 1 Dani Megert CLA 2004-09-22 12:15:37 EDT
With which tool did you profile? Did you ensure that GC run?
Comment 2 Jerome Lanneluc CLA 2004-09-22 12:17:32 EDT
The tool is not relevant. Yes I did run GC.
Comment 3 Philipe Mulet CLA 2004-09-24 03:53:58 EDT
Scenario is: open editor on file with huge number of compile warnings. Fix 
them one at a time, and save/build after each warning correction.
Comment 4 Dani Megert CLA 2004-09-24 04:02:55 EDT
Do you manually build when saying save/build or is auto-build enabled?
I will look at this today.
Comment 5 Philipe Mulet CLA 2004-09-24 04:06:04 EDT
Autobuild is off.
Comment 6 Dani Megert CLA 2004-09-24 11:20:03 EDT
Some update on this one:
- Jerome has quick diff with Version on Disk enabled
- Jerome says there's a leak while the editor is open
Comment 7 Dani Megert CLA 2004-09-24 11:33:16 EDT
I fixed bug 39999 and some other reference to a document after the editor has
been closed. There's one other reference which is known as bug 61432.

So far I was not able to reproduce leaking Line objects while the editor is open.

Philippe, Jerome:
- folding enabled?
- any special commands that you invoked during editing?
Comment 8 Dani Megert CLA 2004-09-27 12:01:22 EDT
The editor only holds on to two documents and those count for around 5000 Line
objects which is OK. org.eclipse.compare.internal.DocumentManager.fgValues holds
on to many documents (around 180) and hence lots of Line objects.

Jerome said he had the Synchronize view open with many changes.
Comment 9 Dani Megert CLA 2005-06-16 06:23:11 EDT
Resetting priority to P3. Will be reassessed for the next release.
Comment 10 Dani Megert CLA 2006-09-27 07:45:21 EDT
I could not detect any leaks here. Please provide more data if you see this again using R3.2 or newer.