scaler deleting destructor
-
Hi all Can anybody tell me what is scalar deleting destructor. When i try to delete a class pointer which is derived from CWnd it is showing this error. class CGraphTollTip : public CWnd { .... .... } class CGraphicsView : public CScrollView { .... .... CGraphTollTip *m_wndGraphTollTip; void CGraphicsView::OnInitialUpdate() { .... m_wndGraphTollTip=new CGraphTollTip[SomeValue]; .... .... } CGraphicsView::~CGraphicsView() { delete [] m_wndGraphTollTip; } .... .... } While deleting m_wndGraphTollTip i am getting this error in vc6.0 callstack. Please help me.
-
Hi all Can anybody tell me what is scalar deleting destructor. When i try to delete a class pointer which is derived from CWnd it is showing this error. class CGraphTollTip : public CWnd { .... .... } class CGraphicsView : public CScrollView { .... .... CGraphTollTip *m_wndGraphTollTip; void CGraphicsView::OnInitialUpdate() { .... m_wndGraphTollTip=new CGraphTollTip[SomeValue]; .... .... } CGraphicsView::~CGraphicsView() { delete [] m_wndGraphTollTip; } .... .... } While deleting m_wndGraphTollTip i am getting this error in vc6.0 callstack. Please help me.
Here is the checklist: 1. Review the destructor of
CGraphTollTip
. Maybe it doesdelete this
in its destructor. 2. Validate the pointer array when you are going to delete it.CGraphicsView::~CGraphicsView()
{
if(m_wndGraphTollTip) {
delete [] wndGraphTollTip;
}
}Maxwell Chen
-
Here is the checklist: 1. Review the destructor of
CGraphTollTip
. Maybe it doesdelete this
in its destructor. 2. Validate the pointer array when you are going to delete it.CGraphicsView::~CGraphicsView()
{
if(m_wndGraphTollTip) {
delete [] wndGraphTollTip;
}
}Maxwell Chen
I have checked the destructor of CGraphTollTip.In that delete this is not there Also in CGraphicsView destructor i had validated the pointer but still the problem is not solved.
-
I have checked the destructor of CGraphTollTip.In that delete this is not there Also in CGraphicsView destructor i had validated the pointer but still the problem is not solved.