Fwd: Re: deleting null pointer arrays (was: Re: extragear/network/ktorrent)

Dominik Haumann dhdev at gmx.de
Wed Jan 21 14:59:08 GMT 2009


On Sunday 18 January 2009, Andreas Hartmetz wrote:
> On Thursday 15 January 2009 13:36:16 Dominik Haumann wrote:
> > Hi,
> >
> > according to [1] this change is wrong:
> > >>         BitSet & BitSet::operator = (const BitSet & bs)
> > >>         {
> > >> -               if (data)
> > >> -                       delete [] data;
> > >> +               delete [] data
> >
> > Still, it seems to be unclear whether that's sill an issue.
> > Does anyone have an idea?
>
> Heh, as the guy who committed that I feel somewhat guilty. I was aware of
> a certain remaining risk when committing those supposedly safe changes,
> most likely because I may have made a mistake in the process.
> This is quite a glaring compiler problem though. I've read most of the
> KDE hints and guidelines some time ago and this one either didn't exist
> at the time or I missed it.

It was added in november 2007 ;) But as Adriaan said, it's cleaner and 
standard, so if there are issues it should be fixed for the Solaris 
packages and even better in the compilers there.
@Ade: Have fun tracking this ;) So it's ok to remove the part on the 
techbase page again? Updates welcome!

Dominik




More information about the kde-core-devel mailing list