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:I have error after importing package org.eclipse.draw2D
Next Topic:Thumbnail problem in RC1
Goto Forum:
  


Current Time: Thu Apr 25 00:48:02 GMT 2024

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

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

Back to the top