#16 bug in CUpdateUIBase - UPDUI_TEXT removed prematurely

Unstable (example)

There are three functions in CUpdateUIBase:
UIUpdateMenuBar, UIUpdateStatusBar, and
UIUpdateChildWindows which incorectly handle UPDUI_TEXT
type _AtlUpdateUIData item. Each function clears and
frees all text items regardless the UI element type or
whether they were updated.
The patch changes the behavior in the way, the text is
deleted only when it is the last update related to this
particular UI element (ID).
I general however, I think, that freeing the memory is
not necessary at all, since it is handled in UISetText
and destructor of CUpdateUIBase, but was not brave
enough to submit *that* patch :).


  • We can't do that because we don't know when to do it. All those functions can manually be called in the code. In your patch you are assuming that all of them will be called, which doesn't have to be true.

    Also, it is extremely unlikely that you would want to set the same text to these different UI elements - they typically have some specific additions.

    This feature sounds good on paper, but is very limited, and usually not even used.



Cancel   Add attachments