KSharedPtr changes

Michael Pyne michael.pyne at kdemail.net
Sun Jan 15 06:38:21 GMT 2006


On Saturday 14 January 2006 08:05, André Wöbbeking wrote:
> On Saturday 14 January 2006 13:06, Boudewijn Rempt wrote:
> > On Saturday 14 January 2006 12:54, Michel Hermier wrote:
> > > One main disaventage of that is that we can't use the
> > > "KSharedPtr<Foo> foo = bar;" syntax.
> > > We must use the "KSharedPtr<Foo> foo(bar);" syntax.
> >
> > I'd hate that... We use this construction in so many places in Krita
> > that it's going to be decided unfun to convert it everywhere.
>
> It's worth this little inconvenience. The dangling pointer from Michel's
> example is much more anoying.

Have you guys actually tested that?  Unless I'm mistaken, in C++, *when 
constructing an object*, the Foo foo = bar; and Foo foo(bar); syntaxes are 
identical and equivalent.

I'll make up some test code and report back.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060115/1088e7c1/attachment.sig>


More information about the kde-core-devel mailing list