|
-
May 14th, 1999, 05:49 AM
#1
allocating memory with new
Hi,
Is there any circumstance in which it is okay not to check for success after a "new" ? I am seeing a lot of code that attempts to create objects on the heap using new without there being a check.
classx * myptr = new classx;
if (myptr==NULL) // this is missing.......
{
}
else // I succeeded
{
etc
etc
}
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
|