Click to See Complete Forum and Search --> : new -- Program hanging at the new statement


M.Murali
April 1st, 1999, 03:19 AM
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

Pol Pal
April 1st, 1999, 05:42 AM
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

Heera
April 1st, 1999, 05:47 AM
Just check the scope of the pointer.

Main Ching
April 1st, 1999, 05:52 AM
Murali,

sorry for my poor english.


problem could be with the pointer declaration or you may be overwriting the pointer. use realloc .

Main Ching
April 1st, 1999, 05:52 AM
Murali,

sorry for my poor english.


problem could be with the pointer declaration or you may be overwriting the pointer. use realloc .

Jhone Joseph
April 1st, 1999, 05:54 AM
May be using globally declared pointer

Santhosh Cheeran
April 1st, 1999, 01:09 PM
Use a

try

{

}

catch(CMemoryException* e)

{

e -> ReportError();

}

on it and check the error