At 2:23 PM -0700 5/9/99, Andrew Ball wrote:
>What's got me worried is that calling the FrmHelp routines below seems to
>cause a leak roughly equivalent to the size of the text in the string of
>the FrmHelp dialogue called (by an eyeball's guess).

FrmHelp never loads the text string into dynamic memory, so that's not it.
(It just locks down the resource and uses the string out of the storage
heap.)

I do notice that FrmSaveActiveState has some wierdness around dealing with
active menus.  This might be a subtle problem relating to the fact that
FrmHelp puts up a modal dialog while a form and a menu are on the screen.
It *looks* like it's set up to return from FrmHelp in a state that matches
the state when FrmHelp was called, with the menu window (if any) still
being active, or the old form being active.

A way to debug this would be to insert DbgBreak calls before and after the
text in question, then do heap dumps in the console window at each point.
By comparing the heap dumps you should be able to quickly identify the
"leaked" chunk, and you can probably display memory to find out what it's
for.

                                --Bob


Reply via email to