Problem: 1667622

Title: (TCommand) Memory leak when DoIt failed

Received: Jul 10 1997 3:00PM


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:

1. Make a 'TYourSimpleFailCommand' (putting a '::FailNIL (NULL);' into its 'DoIt' method).

2. 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:

Fixed. Created a failing command and traced it through. Found where it wasn't being deleted in PerformCommad's exception catcher. File affected:UCommandHandler.cp