Problem: 1648205
Title: (TCommand) Memory leak when DoIt failed
Received: Apr 16 1997 9:13AM
If a command fails into its 'DoIt' method, and you have posted it with
'TDispatcher::PostCommand' method, then the command will not freed from memory.
Steps to reproduce problem:
- Make a 'TYourSimpleFailCommand' (putting a '::FailNIL (NULL);' into its 'DoIt'
method).
- Post it with 'gDispatcher->PostCommand (aYourSimpleFailCommand);'.
That’s all: you have a memory leak.
The problem appeares to be in:
'void TCommandHandler::PerformCommand(TCommand* command)'.
Fix:
Problems like this have already been cleaned up through the use of auto-ptrs.