Disposing of items in the Gallery [message #589348] |
Fri, 18 April 2008 03:45 |
Trevor Campbell Messages: 23 Registered: July 2009 |
Junior Member |
|
|
I am using the Gallery to show a collection of Images and need to dispose
of the image resources when they are no longer needed.
I tried:
DisposeListener mImageDisposalListener = new DisposeListener()
{
@Override
public void widgetDisposed(DisposeEvent e)
{
GalleryItem item = (GalleryItem) e.widget;
item.getImage().dispose();
}
};
galleryItem.addDisposeListener(mImageDisposalListener);
but have found that the widgetDisposed event is not being fired when the
container is disposed of.
Is this a bug? or should I be trying to track and dispose of all the image
resources myself.
|
|
|
Powered by
FUDForum. Page generated in 0.81092 seconds