[Development] Notes from the Containers session from QtCS

Thiago Macieira thiago.macieira at intel.com
Sun Jun 24 22:24:01 CEST 2012


On domingo, 24 de junho de 2012 22.13.58, André Pönitz wrote:
> For some reason I forgot to mention that with the current guarantee for
> fromRawData usage (user has to make sure that the base data will not be
> deleted or modified as long as the QString (or an unmodified copy of it)
> exists) this does not require d 'data' at all, just another 'magic'
> d_offset value to identify the situation. Reference counting is not
> needed, as the string (and copies thereof) have been guaranteed to die
> before the base data goes away.

It breaks the Foreign Data case, for which the d pointer includes more data 
(the notify-on-delete function).

> However, since there's no chance to cross the pass-on-stack vs pass-in
> -registers boundary, and we might face extra work if we go further down
> the cheap substrings (on-potentially-fromRawData-strings...) road I
> concede that pursuing that direction is not worthwhile, and having
> always enough space to store a full d pointer opens up the possibility
> to e.g. pass custom deleters around in such cases, i.e. make (more)
> fromRawData strings first class citizens.

Yup.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120624/9f7adc48/attachment.sig>


More information about the Development mailing list