Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Sticky Edit Part (GC wont collect)
Sticky Edit Part (GC wont collect) [message #230699] Thu, 15 February 2007 11:37 Go to next message
Eclipse UserFriend
Originally posted by: lamont_gilbert.rigidsoftware.com

I have an Editor, and within it in I have its main EditPart. Normally I
open the editor with its proper IEditorInput and work on the drawing, etc.
Then close the editor. In this case, the edit part is reclaimed by the GC
when I run it.

However, I changed the editor so that when I save the drawing, I fire its
input changed property. This causes the editor to reread the model and
create new edit parts for everything. This is what I want to happen.

The problem is, when I do this, the edit parts do not get reclaimed. Not
even after I close the editor. Something happens to the edit part during
the close process that allows it to be GCd that does not happen to it when
I fire the input changed event.

Any ideas?


Thanks,

CL
Re: Sticky Edit Part (GC wont collect) [message #230707 is a reply to message #230699] Thu, 15 February 2007 11:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lamont_gilbert.rigidsoftware.com

On Thu, 15 Feb 2007 06:37:13 -0500, CL 'dnoyeB' Gilbert wrote:

> I have an Editor, and within it in I have its main EditPart. Normally I
> open the editor with its proper IEditorInput and work on the drawing, etc.
> Then close the editor. In this case, the edit part is reclaimed by the GC
> when I run it.
>
> However, I changed the editor so that when I save the drawing, I fire its
> input changed property. This causes the editor to reread the model and
> create new edit parts for everything. This is what I want to happen.
>
> The problem is, when I do this, the edit parts do not get reclaimed. Not
> even after I close the editor. Something happens to the edit part during
> the close process that allows it to be GCd that does not happen to it when
> I fire the input changed event.
>
> Any ideas?
>
>
> Thanks,
>
> CL


Maybe you know of a free memory profiler that can tell me which object is
holding my refernces? Last time I had similar problem I found the editor
input is held by the history. i dont recall what profiler I had back then
though as my windows needed its weekly reinstall...

Thanks again.
Re: Sticky Edit Part (GC wont collect) [message #230779 is a reply to message #230699] Sat, 17 February 2007 01:14 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

The LogicEditor does something similar in its ResourceTracker. If the file
is modified somehow, it invokes setInput(). You should look how it's done
there.


"CL 'dnoyeB' Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in message
news:pan.2007.02.15.11.37.12.653892@rigidsoftware.com...
>I have an Editor, and within it in I have its main EditPart. Normally I
> open the editor with its proper IEditorInput and work on the drawing, etc.
> Then close the editor. In this case, the edit part is reclaimed by the GC
> when I run it.
>
> However, I changed the editor so that when I save the drawing, I fire its
> input changed property. This causes the editor to reread the model and
> create new edit parts for everything. This is what I want to happen.
>
> The problem is, when I do this, the edit parts do not get reclaimed. Not
> even after I close the editor. Something happens to the edit part during
> the close process that allows it to be GCd that does not happen to it when
> I fire the input changed event.
>
> Any ideas?
>
>
> Thanks,
>
> CL
Previous Topic:Flowlayout and EditPolicy.LAYOUT_ROLE
Next Topic:How can I integrate a PolylineEntry in the Palette?
Goto Forum:
  


Current Time: Tue Apr 23 13:02:51 GMT 2024

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

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

Back to the top