Bug 248386 - GridTableViewer has a memory leak problem by cross-reference.
Summary: GridTableViewer has a memory leak problem by cross-reference.
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Mirko Paturzo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-24 02:41 EDT by Soichiro Yoshimura CLA
Modified: 2021-07-05 11:40 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Soichiro Yoshimura CLA 2008-09-24 02:41:39 EDT
Build ID: I20080617-2000

Steps To Reproduce:
GridTableViewer have two not garbage collected fields.

  cachedRow
  rowHeaderLabelProvider

these fields were cross referenced.

More information:
Please add this orverride method if there are no problem.

/**
 * @see org.eclipse.jface.viewers.StructuredViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
 */
protected void handleDispose(DisposeEvent event)
{
	super.handleDispose(event);
	
	this.cachedRow = null;
	this.rowHeaderLabelProvider = null;
}
Comment 1 Mirko Paturzo CLA 2014-02-06 14:42:37 EST
Hi all,
in my patch, i have change the method with:

    @Override	
    protected void handleDispose(final DisposeEvent event)
    {	
        super.handleDispose(event);
        cachedRow = null;
        rowHeaderLabelProvider = null;

        getGrid().setRedraw(false);	
        getGrid().disposeAllItems();	
        getGrid().clearItems();
    }

I'll do some tests for verify if there is a memory leak

Mirko
Comment 2 Mirko Paturzo CLA 2014-02-10 08:07:09 EST
Pa
Comment 3 Mirko Paturzo CLA 2014-02-10 08:07:53 EST
Improve dispose performace and create a snippet test.
Comment 4 Mirko Paturzo CLA 2014-02-10 10:43:30 EST
Test done and bug fixed