[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: About memory allocation failures....
From: Guillaume Laurent <glaurent () telegraph-road ! org>
Date: 2002-01-30 15:04:46
[Download RAW message or body]
On Wednesday 30 January 2002 15:51, Schmidt, John wrote:
> I think you need to reread Alex's comments, the performance penalty he
> mentions
> is when you do try {...} catch {...} block, not simply doing an if check
> for NULL
> on a malloc().
Yes, but this is C++ so, as it was said several times already :
- we don't use malloc(), but 'new'
- 'new' never returns null, it throws.
> If you do NOT check for NULL and subsequently try to write
> to the
> storage addressed from your NULL pointer, this is what you get:
I'm pretty confident everybody here knows what happens when you dereference a
null ptr, thank you.
Now I suggest we end this thread here, as all that was worth saying has been
said.
--
Guillaume
http://www.telegraph-road.org
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic