Skip to main content



      Home
Home » Eclipse Projects » GEF » SelectionAction.dispose()
SelectionAction.dispose() [message #234899] Thu, 31 May 2007 14:35 Go to next message
Eclipse UserFriend
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 12:41 Go to previous message
Eclipse UserFriend
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:I have error after importing package org.eclipse.draw2D
Next Topic:Thumbnail problem in RC1
Goto Forum:
  


Current Time: Wed Jul 23 22:03:25 EDT 2025

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

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

Back to the top