You are right and I thought so. But StdAfx.h is PCH in my case (as usual). I also Rebuilt the project, but problem remains the same: When object ceases, it causes AV. I tried: stack allocation, heap, static instance and global instance -- ALL fails when object destroys. The problem is at line 121 in Afx.INL:Code:_AFX_INLINE CStringData* CString::GetData() const { ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }




Reply With Quote