another puzzle but i think its related:
when i allocated the buffer i used
char* ptr = new char [1000];
char* ptr = new char [1000];
To copy to clipboard, switch view to plain text mode
then,
i pass it to my class like this
myClass* c = new myClass(ptr);
myClass* c = new myClass(ptr);
To copy to clipboard, switch view to plain text mode
in the destructor of my myClass I did this
myClass::~myClass()
{
int x = sizeof(m_ptr); //remember m_ptr was declared as char*
delete[] m_ptr;
}
myClass::~myClass()
{
int x = sizeof(m_ptr); //remember m_ptr was declared as char*
delete[] m_ptr;
}
To copy to clipboard, switch view to plain text mode
int xis equal to four (4) bytes when i stopped (passed) there.
hmmmm....
baray98
Bookmarks