I am writing an appication in visual studio 6. I am using MFC (Specifically CRecordset). I allocate a new instance of CRecordset by using "new".
CModuleRecordSet * rs = new CModuleRecordSet(&this->m_Database);
Later, when I am done with the object, I call "delete". as in
What I notice is that delete calls into the delete operator defined in afxmem.cpp.
void PASCAL CObject::operator delete(void* p)
The question is, why is it calling free intstead of delete? And how do I fix this?
Note, I have checked that in later versions of visual studio, the code in afxmem.cpp seems to be the same.