> Note the dialog is always closed with a call to
> EndModal.
Is the dialog object itself destroyed?
>> Is the dialog object itself destroyed?
>
> Thanks, it was not being destroyed, that was the problem.
Whereever possible, I try to use smart pointers to avoid this problem. My
policy is that a naked pointer is a "non-owning" pointer and that code does
not have responsibility for deleting the pointed-at object.
You can use either std::auto_ptr, or one of the many boost smart pointers
for replacing raw pointers.