|
-
April 1st, 1999, 04:19 AM
#1
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
-
April 1st, 1999, 06:42 AM
#2
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
-
April 1st, 1999, 06:47 AM
#3
Re: new -- Program hanging at the new statement
Just check the scope of the pointer.
-
April 1st, 1999, 06:52 AM
#4
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 .
-
April 1st, 1999, 06:54 AM
#5
Re: new -- Program hanging at the new statement
May be using globally declared pointer
-
April 1st, 1999, 02:09 PM
#6
Re: new -- Program hanging at the new statement
Use a
try
{
}
catch(CMemoryException* e)
{
e -> ReportError();
}
on it and check the error
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|