BCGControlBar Pro for MFC
BOOL BCGP_EDIT_UNDO_ACTION::m_bDestroyActionData

Specifies whether to destroy the user-defined action data or not.

If TRUE the user defined data associated with the undo action will be destroyed automatically when the undo action is removed from the undo buffer.