ScrollableThumbnail - image disposal [message #86715] |
Tue, 08 July 2003 10:31  |
Eclipse User |
|
|
|
Hi,
In the ScrollableThumbnail class, when deactivate() is called, the
super.deactivate() declared in Thumbnail - in turn calls
updater.deactivate().
The ThumbnailUpdater class deactivate() method calls dispose on the
Thumbnail image.
public void deactivate() {
setActive(false);
stop();
if (thumbnailImage != null) {
thumbnailImage.dispose();
thumbnailImage = null;
thumbnailImageSize = null;
}
}
When you create an instance of ScrollableThumbnail, a SelectorFigure is
created in the initialize method. This SelectorFigure also has an
image. This image is disposed of in the finalize method.
Is there a reason as to why these two ScrollableThumbnail specific
images are being disposed of at different times? Why would they not
both be disposed of on deactivate?
Regards,
Stephanie
|
|
|
|
Re: ScrollableThumbnail - image disposal [message #87152 is a reply to message #86871] |
Mon, 14 July 2003 11:26  |
Eclipse User |
|
|
|
Great, thanks.
Eric Bordeau wrote:
> I'm not sure why it was done this way. I agree the SelectorFigure's image
> should be disposed of during deactivate() and not finalize(). I'll look into
> making this change.
>
> Eric
>
> S Chafe wrote:
>
> > Hi,
> >
> > In the ScrollableThumbnail class, when deactivate() is called, the
> > super.deactivate() declared in Thumbnail - in turn calls
> > updater.deactivate().
> >
> > The ThumbnailUpdater class deactivate() method calls dispose on the
> > Thumbnail image.
> >
> > public void deactivate() {
> > setActive(false);
> > stop();
> > if (thumbnailImage != null) {
> > thumbnailImage.dispose();
> > thumbnailImage = null;
> > thumbnailImageSize = null;
> > }
> > }
> >
> > When you create an instance of ScrollableThumbnail, a SelectorFigure is
> > created in the initialize method. This SelectorFigure also has an
> > image. This image is disposed of in the finalize method.
> >
> > Is there a reason as to why these two ScrollableThumbnail specific
> > images are being disposed of at different times? Why would they not
> > both be disposed of on deactivate?
> >
> > Regards,
> > Stephanie
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.03239 seconds