Memory leak during GalleryTreeViewer.refresh() method? [message #54898] |
Wed, 25 June 2008 02:14  |
Eclipse User |
|
|
|
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 03:41  |
Eclipse User |
|
|
|
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 11:44  |
Eclipse User |
|
|
|
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 03:41  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.07521 seconds