动态产生的CEikDateEditor delete出错
有一个CEikDateEditor
构造过程如下
CEikDateEditor *aDateEditor = new (ELeave) CEikDateEditor;
aDateEditor->SetContainerWindowL(*parent);
TTime time;
time.HomeTime();
aDateEditor->ConstructL(KAknMinimumDate, KAknMaximumDate, time, ETrue);
aDateEditor->MakeVisible(EFalse);
当控件不使用时
if(aDateEditor->IsFocused())
aDateEditor->SetFocus(EFalse);
delete aDateEditor;
aDataEditor = NULL;
就会报一个莫名其妙的错误
但是
如果delete aDateEditor;这一行注释掉内存泄漏的话不会报错
[解决办法]
具体是个什么错误?