Determining When an Object is valid
Hello,
I know there are function like the AfxIsValidAddress() that allows you to
check whether an address is valid or not; however, when the process thread
is in the middle of the "this" object, is there a way to determine whether
"this" object is valid. A case in point, I created a AfxMessageBox in the
middle of the "foo" object. By the time the user responded to the
AfxMessageBox, the "foo" object was deleted by another process. So when the
thread returns from the modal message box, the foo object is invalid, and I
get a memory fault when I access the "foo"'s member variable.
Any suggest is appreciated.
Peter