I got an Assert failure and program exit. I debug it and find that the error message points to a
IsBadReadPtr(myClassobj , sizeof(*myClassobj)
(myClassObj is a pointer to an object)
I have no clue how it happens, can anyone tell me the reason for this error?
I would analyze the destructor of your class. Also check for static data memebers that could be pointers. I assume you alread know what myClassObj is so search through it and place a break-point or trace statement on every line you "new" and "delete". Also, make sure to set the pointer back to NULL when you do delete it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.