[Qt-interest] Qt memory management.

Ramesh ramesh.bs at robosoftin.com
Wed Aug 18 14:00:09 CEST 2010


Thanks Oliver :)
Have nice day

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of
Oliver.Knoll at comit.ch
Sent: Wednesday, August 18, 2010 4:23 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Qt memory management.

Ramesh wrote on Wednesday, August 18, 2010 12:30 PM:

> ...
> So it means, assignment of one Qstring to another does copy or not?

No: the fact that QString does not inherit from QObject does /not/ imply
that its internal data is copied at the time of assignment ("deep copy"). In
fact the internal QString data is only copied *when needed*, that is when
one of the copies is modified ("copy on write").

Actually that is all well documented here:
http://doc.trolltech.com/4.6/qstring.html#details

And here: http://doc.trolltech.com/4.6/implicit-sharing.html

Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.



More information about the Qt-interest-old mailing list