[Qt-interest] a litte mild 'rant'

wim.delvaux at adaptiveplanet.com wim.delvaux at adaptiveplanet.com
Mon Mar 30 19:31:39 CEST 2009


> > > So having to free the memory yourself would be better?
> >
> > Well QString manages string memory space too. perhaps it can manage an
>
> 'ascii'
>
> > stringsspace too.
>
> It does.. that's why it is deleting it when it goes out of scope.

It should not 'delete' the ascii stringspace when it goes out of context but 
is deleted.

E.g. when you have a QLineEdit() and call ->text() on it, surely the string 
does not go out of scopy.  However

	QLineEdit()->text().toLatin1().constData() is bad ...

W



More information about the Qt-interest-old mailing list