I have a server code written in VC. In the destructor of a calss i am trying to delete a array, system is throwing a invalid pointer exception.This issue is seen in Linux only.
The same code is below
Struct ActionType
{
ActionType()
{
Code=0;
active=false;
pnwWriter=0;
}
~ActionType()
{
if(pnwWriter)
delete pnwWriter;
}
double code;
bool active;
PnwWriter *pnwWriter
}
Inside class
m_Obj=new ActionType[Count];
after this i am adding few values to it. Then in destructor i am trying to delete m_obj like
if(m_Obj)
delete[] m_obj;
When we execute this line system is throwing Invalid pointer exception. Please suggest me how can i resolve this problem.
Veeresh Angadi