a text on optimizing C++

Wilco Greven kde-optimize@mail.kde.org
Sat, 25 Jan 2003 02:20:54 +0100


On Saturday 25 January 2003 01:10, David Leimbach wrote:
> On Friday 24 January 2003 05:17 pm, Martijn Klingens wrote:
> > On Friday 24 January 2003 23:29, Waldo Bastian wrote:
> > > It only works as long as you need to write one entry.
> >
> > Ehm, I used Lubos' code as example. In my case it wasn't about KConfig.
> >
> > I was merely asking if such a construct to not introduce a symbol is
> > frowned upon or acceptable.
> >
> > Real example:
> >
> > ( new QVBoxLayout( ... ) )->setAutoAdd( true );
>
> Looks like a memory leak to me.. . you just constructed something and threw
> out the pointer

The QVBoxLayout is created as a child of a widget. The widget is responsible 
for deleting the layout. So there's no memory leak.

-- 
Wilco