Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Memory Leak in IEditorInput class
Memory Leak in IEditorInput class [message #465533] Mon, 02 April 2007 07:04 Go to next message
Eclipse UserFriend
Originally posted by: seah.sherley.gmail.com

Hello everyone,
I have been using JProfiler to track for any memory leak.
To my horror, the class that implement the IEditorInput has a memory leak. I tried all ways to dispose any frame, composite windows etc but its useless.
None of the class except the class that implements IEditorInput will always be stuck in the memory over a short time.
Suppose I open 2 instance of the class that implemenent Editor Plus, IEditorInput and all the classes will increase their instance to 2. After a while, all the classes instance except IEditorInput is will be zero.
Then I open some more windows in the editor window.
IEditor input keep increase instance. Rubbish collection also no use.

How can I solve this problem?
Re: Memory Leak in IEditorInput class [message #465616 is a reply to message #465533] Tue, 03 April 2007 09:17 Go to previous message
Paul Illingworth is currently offline Paul IllingworthFriend
Messages: 4
Registered: July 2009
Junior Member
Seah Sherley wrote:
> Hello everyone,
> I have been using JProfiler to track for any memory leak.
> To my horror, the class that implement the IEditorInput has a memory leak. I tried all ways to dispose any frame, composite windows etc but its useless.
> None of the class except the class that implements IEditorInput will always be stuck in the memory over a short time.
> Suppose I open 2 instance of the class that implemenent Editor Plus, IEditorInput and all the classes will increase their instance to 2. After a while, all the classes instance except IEditorInput is will be zero.
> Then I open some more windows in the editor window.
> IEditor input keep increase instance. Rubbish collection also no use.
>
> How can I solve this problem?

IEditorInput implementations should be very lightweight and only hold a
reference to the data, a key or some id to locate the data and not the
data itself. You may find that the references are being held onto in the
most recently used file menu. As well as being held in here they can ,
optionally, be persisted so that the menu can be restored on application
startup.

Regards
Paul I.
Previous Topic:Dynamic Help in RCP
Next Topic:How to deal with network problem in an IM application?
Goto Forum:
  


Current Time: Fri Apr 19 18:50:12 GMT 2024

Powered by FUDForum. Page generated in 0.03011 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top