[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdebase/kcontrol/componentchooser
From:       Matthias Kretz <kretz () kde ! org>
Date:       2003-09-23 18:16:16
[Download RAW message or body]


On Tuesday September 23 2003 19:47, Carsten Pfeiffer wrote:
> On Tuesday 23 September 2003 15:17, Matthias Kretz wrote:
> > +                        KSimpleConfig *cfg=new
> > KSimpleConfig(latestEditedService); +                       
> > plugin->load( cfg );
> > +                        delete cfg;
>
> Please don't allocate that on the heap unless you have to.
>
> KSimpleConfig cfg( latestEditedService );
> will do just fine. No malloc, no free needed.

You're right. That's copy and paste from a few lines down without thinking 
about it.

-- 
C'ya
        Matthias
________________________________________________________
Matthias Kretz (Germany)                          <><
http://Vir.homeip.net/
MatthiasKretz@gmx.net, kretz@kde.org,
Matthias.Kretz@urz.uni-heidelberg.de

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic