SelectionAction.dispose() [message #234899] |
Thu, 31 May 2007 18:35 |
|
Hello,
I have an action (MyAction.java) that inherits from SelectionAction.
MyAction uses dynamic images to set the imageDescriptor of the action. I
am disposing off this image in the dispose method as follows:
public void dispose()
{
super.dispose();
if (this.myImage != null && !this.myImage.isDisposed())
{
this.myImage.dispose();
this.myImage = null;
}
}
This function never gets called leading to image leaks in my code. Can
someone please shed some light on the lifecycle of an action? When is the
dispose() method called? Why is it not being called in this case?
Thanks,
Upkar.
|
|
|
Re: SelectionAction.dispose() [message #234948 is a reply to message #234899] |
Fri, 01 June 2007 16:41 |
|
This question was answered in the eclipse.platform newsgroup.
Thanks.
Upkar Lidder wrote:
> Hello,
> I have an action (MyAction.java) that inherits from SelectionAction.
> MyAction uses dynamic images to set the imageDescriptor of the action. I
> am disposing off this image in the dispose method as follows:
> public void dispose()
> {
> super.dispose();
> if (this.myImage != null && !this.myImage.isDisposed())
> {
> this.myImage.dispose();
> this.myImage = null;
> }
> }
> This function never gets called leading to image leaks in my code. Can
> someone please shed some light on the lifecycle of an action? When is the
> dispose() method called? Why is it not being called in this case?
|
|
|
Powered by
FUDForum. Page generated in 0.02517 seconds