|
Re: Unable to delete Commands [message #793797 is a reply to message #793792] |
Wed, 08 February 2012 15:27 |
|
Hi,
what is the path to GC root of your command instance?
I suppose that it is retained by the CommandStack.
So you can limit the size of the stack or try to clean it.
Regards,
Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
|
|
|
|
|
Re: Unable to delete Commands [message #797433 is a reply to message #795482] |
Mon, 13 February 2012 13:32 |
Michael Golubev Messages: 383 Registered: July 2009 |
Senior Member |
|
|
Hello,
It is unclear why do you want to call dispose at the first place.
To my understanding, this method is intended to be called by the CommandStack of limited size, when it pushes the command out of itself. This is the way to tell you that it is safe to release the resources aquired in the command, so you are only expected to implement it, not to explicitly call it.
Note the javadoc of Command#dispose() that states:
/**
* This is called to indicate that the <code>Command</code> will not be used
* again. The Command may be in any state (executed, undone or redone) when
* dispose is called. The Command should not be referenced in any way after
* it has been disposed.
*/
and this is clearly not your case because the command stack still references it.
What is the high level effect you are trying to achieve?
Regards,
Michael "Borlander" Golubev
at Montages Think Tank, Prague, Czech Republic
Montages AG, Zürich, Switzerland
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03994 seconds