new -- Program hanging at the new statement
Hi,
Guys my program and computer is hanging at the new statement (when I am trying to
allocate memory for a charecter pointer). When I tried to debug through the new
statement, I found that my program is hangin at HeapAlloc call (which is called
from the dbg_alloc). Please give your suggestion regarding this
waiting for your help
Re: new -- Program hanging at the new statement
Hi,
i think the problem could be the place where you use 'new' operator. if it is outside the scope of the pointer you may get the problem. same problem i got long back.
Pol Pal
Re: new -- Program hanging at the new statement
Just check the scope of the pointer.
Re: new -- Program hanging at the new statement
Murali,
sorry for my poor english.
problem could be with the pointer declaration or you may be overwriting the pointer. use realloc .
Re: new -- Program hanging at the new statement
May be using globally declared pointer
Re: new -- Program hanging at the new statement
Use a
try
{
}
catch(CMemoryException* e)
{
e -> ReportError();
}
on it and check the error