代码:struct s
{
    CArray<int, int> a;
};struct s * x = (struct s *)malloc(sizeof(struct s));
x->a.RemoveAll();
-----------------------------------------------------------
dubug运行到x->a.RemoveAll()时, 弹出一个assert:Debug Assertion Failed!
File: afxtempl.h
Line: 307
For information on how your program can cause an assertion failure, see the Visual C__ documentation on asserts.
-----------------------------------------------------------
但运行release就没有任何问题, 程序结果也正确-----------------------------------------------------------
还有,我改成
struct s x;
x.a.RemoveAll();
dubug就没有assert
但我要用debug调试啊,请问如何解决?多谢!