Scalar deleting destructor, an unhandled exception during a user callback, when program exit

  • Thread starter Thread starter KeanHeng
  • Start date Start date
K

KeanHeng

Guest
Greetings...

Anyone can advise what is wrong and what can be done?


CRunProcess* m_Proc[NUM_PROC];

CMainClass::~CMainClass()
{
for (int i = 0; i < NUM_PROC; i++)
{
if (m_Proc != NULL)
{
delete m_Proc;
m_Proc = NULL;
}
}
}



m_Proc[RUN_PROCESS_1] = new CProcess1();
virtual ~CProcess1()
{
// OK
}

m_Proc[RUN_PROCESS_2] = new CProcess2();
virtual ~CProcess2()
{
// OK
}

m_Proc[RUN_PROCESS_3] = new CProcess3();
virtual ~CProcess3()
{
// Here Have Nothing also encountered error during Program exit
// NOT OK ; calling destructor Twice, failed on 2nd time
// An unhandled exception was encountered during a user callback
// Scalar deleting destructor
}

m_Proc[RUN_PROCESS_4] = new CProcess4();
virtual ~CProcess4()
{
// OK
}

Thanks a bunch!

CHeers~~~

Continue reading...
 
Back
Top