[Digikam-devel] Re: delete does not reset the pointer in GCC (4.6.0)

Gilles Caulier caulier.gilles at gmail.com
Wed Jun 15 09:45:16 BST 2011


What' about an GCC option to handle pointers properly, and reset to zero
after delete. It's a question of course...

Gilles Caulier

2011/6/15 Andi Clemens <andi.clemens at gmx.net>

> Yes we changed your scenario, too.
> But we also changed the code I described before. Maybe this is longer than
> a few months ago, maybe 2 years.
> I know that I always added
> xyz = 0;
> to my code before, but then it was removed again because it is not
> neccessary with modern compilers (I don't know who said that).
>
>
>
>
> On Wed, 15 Jun 2011 10:30:56 +0200, Marcel Wiesweg <marcel.wiesweg at gmx.de>
> wrote:
>
> >
> >> some time ago we removed all lines that looked like that
> >>
> >> delete xyz;
> >> xyz = 0;
> >
> > Are you really sure about this? I hope not. Because I would agree that
> > crashes immediately...
> >
> > Didnt we change
> > if (xyz) delete xyz;
> > to
> > delete xyz;
> > ?
> >
> >
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20110615/eff6369a/attachment.html>


More information about the Digikam-devel mailing list