Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » SelectionAction.dispose()
SelectionAction.dispose() [message #234899] Thu, 31 May 2007 18:35 Go to next message
Lidder is currently offline LidderFriend
Messages: 46
Registered: July 2009
Member
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 Go to previous message
Lidder is currently offline LidderFriend
Messages: 46
Registered: July 2009
Member
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?
Previous Topic:Tooltip extra large
Next Topic:How can I use GEF to make UML diagram
Goto Forum:
  


Current Time: Sat Aug 13 00:45:38 GMT 2022

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

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

Back to the top