From kde-devel Wed Jan 30 15:04:46 2002 From: Guillaume Laurent Date: Wed, 30 Jan 2002 15:04:46 +0000 To: kde-devel Subject: Re: About memory allocation failures.... X-MARC-Message: https://marc.info/?l=kde-devel&m=101240315315661 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 <<