[Qt-interest] Shared Pointers...
BRM
bm_witness at yahoo.com
Fri Dec 4 19:40:09 CET 2009
----- Original Message ----
From: Thiago Macieira <thiago at kde.org>
> Em Sexta-feira 4. Dezembro 2009, às 01.29.48, BRM escreveu:
> > And
> > from it, I think I may really need QSharedDataPointer...I was really
> > not wanting to write another class though - since I really want to just
> > pass around QByteArrays in a safe way across the various threads
> > without having stuff copied.
> QByteArray already uses same method as QSharedDataPointer. Like I pointed out
> in the blog post, the only reason why the tool classes in Qt don't use
> QSharedDataPointer is that they were written before QSDP.
The interesting thing is moving from QByteArray to QSharedPointer<QByteArray> stabilized the memory usage in part of the program.
Still figuring out why it isn't stabilizing it the other other part. But there is definitely a performance boost.
Ben
More information about the Qt-interest-old
mailing list