On quarta-feira, 13 de junho de 2012 18.14.59, aaron.kenn...@nokia.com wrote:
> Won't a QString always require an allocation for the d-ptr?  So it'll never
> be quite as cheap as QStringRef.

Not exactly.

A QStringRef points to an existing QString. Therefore, if we take a QString
that is pointing to a substring of an existing QString, the d-ptr is already
allocated. The new QString would be as cheap as the current QStringRef.

The issue we'll run into is that a substring could be "holding hostage" a huge
chunk of memory.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to