Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Memory leak during GalleryTreeViewer.refresh() method?
Memory leak during GalleryTreeViewer.refresh() method? [message #54898] Wed, 25 June 2008 06:14 Go to next message
Niko Kumpu is currently offline Niko KumpuFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

Overview: Memory is leaked when refresh() method is called for
GalleryTreeViewer. It only happens if one or more gallery tree nodes are
expanded.

Steps to Reproduce:
1) Expand one or more gallery tree nodes. The more images under the nodes
the bigger the memory leak.
2) call GalleryTreeViewer.refresh() method several times and monitor (e.g.
with Task Manager) how the memory usage grows.

Build Date & Platform:
CVS head revision 2008-06-24 on Windows XP Professional (SP2)

-------------------------
Should this happen or am I possibly doing something wrong?

Niko
Re: Memory leak during GalleryTreeViewer.refresh() method? [message #55198 is a reply to message #54898] Thu, 26 June 2008 15:44 Go to previous messageGo to next message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi Niko,

Gallery, like Table or Tree does not dispose item's images when you
dispose an item. In SWT, if you created an Image, you're responsible of
disposing it.

I think the problem is in your label provider which probably returns a
new Image each time you call getImage();

Regards
--
Nicolas

Niko Kumpu a écrit :
> Hi,
>
> Overview: Memory is leaked when refresh() method is called for
> GalleryTreeViewer. It only happens if one or more gallery tree nodes are
> expanded.
>
> Steps to Reproduce:
> 1) Expand one or more gallery tree nodes. The more images under the nodes
> the bigger the memory leak.
> 2) call GalleryTreeViewer.refresh() method several times and monitor (e.g.
> with Task Manager) how the memory usage grows.
>
> Build Date & Platform:
> CVS head revision 2008-06-24 on Windows XP Professional (SP2)
>
> -------------------------
> Should this happen or am I possibly doing something wrong?
>
> Niko
>
>
Re: Memory leak during GalleryTreeViewer.refresh() method? [message #55765 is a reply to message #55198] Tue, 08 July 2008 07:41 Go to previous message
Niko Kumpu is currently offline Niko KumpuFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks Nicolas,

you are absolutely right. I had missed checking the whole label provider and
it is indeed creating a new image each time getImage() is called. I was sick
for a while here but I will now look into it...

br,
Niko

"Nicolas Richeton" <nicolas.richeton@gmail.com> wrote in message
news:4863B94F.2040407@gmail.com...
> Hi Niko,
>
> Gallery, like Table or Tree does not dispose item's images when you
> dispose an item. In SWT, if you created an Image, you're responsible of
> disposing it.
>
> I think the problem is in your label provider which probably returns a new
> Image each time you call getImage();
>
> Regards
> --
> Nicolas
>
> Niko Kumpu a
Re: Memory leak during GalleryTreeViewer.refresh() method? [message #590750 is a reply to message #54898] Thu, 26 June 2008 15:44 Go to previous message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi Niko,

Gallery, like Table or Tree does not dispose item's images when you
dispose an item. In SWT, if you created an Image, you're responsible of
disposing it.

I think the problem is in your label provider which probably returns a
new Image each time you call getImage();

Regards
--
Nicolas

Niko Kumpu a écrit :
> Hi,
>
> Overview: Memory is leaked when refresh() method is called for
> GalleryTreeViewer. It only happens if one or more gallery tree nodes are
> expanded.
>
> Steps to Reproduce:
> 1) Expand one or more gallery tree nodes. The more images under the nodes
> the bigger the memory leak.
> 2) call GalleryTreeViewer.refresh() method several times and monitor (e.g.
> with Task Manager) how the memory usage grows.
>
> Build Date & Platform:
> CVS head revision 2008-06-24 on Windows XP Professional (SP2)
>
> -------------------------
> Should this happen or am I possibly doing something wrong?
>
> Niko
>
>
Re: Memory leak during GalleryTreeViewer.refresh() method? [message #590981 is a reply to message #55198] Tue, 08 July 2008 07:41 Go to previous message
Niko Kumpu is currently offline Niko KumpuFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks Nicolas,

you are absolutely right. I had missed checking the whole label provider and
it is indeed creating a new image each time getImage() is called. I was sick
for a while here but I will now look into it...

br,
Niko

"Nicolas Richeton" <nicolas.richeton@gmail.com> wrote in message
news:4863B94F.2040407@gmail.com...
> Hi Niko,
>
> Gallery, like Table or Tree does not dispose item's images when you
> dispose an item. In SWT, if you created an Image, you're responsible of
> disposing it.
>
> I think the problem is in your label provider which probably returns a new
> Image each time you call getImage();
>
> Regards
> --
> Nicolas
>
> Niko Kumpu a
Previous Topic:GridViewer - CheckBoxCellEditor - Databinding
Next Topic:Gantt -> Java 5.0?
Goto Forum:
  


Current Time: Sat Dec 21 14:24:44 GMT 2024

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

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

Back to the top