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

List:       kde-core-devel
Subject:    Re: Wrong QSharedDataPointer<Private> in kdelibs?
From:       "Nicolas Ternisien" <nicolas.ternisien () gmail ! com>
Date:       2008-04-24 7:36:27
Message-ID: ccba71b50804240036o53f8608ci6fb92bbb746f7437 () mail ! gmail ! com
[Download RAW message or body]

In fact, no, you didn't notive that it's QSharedDataPointer<Private>
and not QSharedDataPointer<Private>* ;-)

On Wed, Apr 23, 2008 at 9:52 PM, Christian Ehrlicher
<Ch.Ehrlicher@gmx.de> wrote:
> Thiago Macieira schrieb:
>
>
> > Christian Ehrlicher wrote:
> >
> > > Hi,
> > >
> > > Everywhere in kdelibs I see such constructs:
> > >
> > > QSharedDataPointer<Private> d;
> > >
> > > KFoo::KFoo() : d(new Private())
> > > {}
> > >
> > > KFoo::~KFoo()
> > > {}
> > >
> > >
> > > I'm missing 'delete d' in dtor - or do I miss something here?
> > >
> >
> > You're missing the QSharedDataPointer destructor. It takes care of that
> for you.
> >
> >
>  My problem was that i did not notice that it's QSharedDataPointer<Private>
> and not QSharedDataPointer<Private*>.
>
>  Christian
>
[prev in list] [next in list] [prev in thread] [next in thread] 

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