[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Seg Fault in KPanel /KDE_1_1_Branch (fwd)
From: Rik Hemsley <rik () rikkus ! demon ! co ! uk>
Date: 1999-07-05 7:31:00
[Download RAW message or body]
On 05-Jul-99 Stephan Kulow wrote:
> [...]
> Well, delete [] 0 is very much legal. I don't know why people keep
> on adding "if (ptr) delete ptr;" :(
void * c(0);
delete c; // -> ok
void * d;
delete d; // -> segfault
Answer: Because sometimes you're not sure if the pointer was initialised to 0.
Cheers,
Rik
--
KDE - Colour outside the lines : http://www.kde.org
[[without]] - software for KDE : http://without.netpedia.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic