[email protected]
[Top] [All Lists]

Re: deep copy of QStringList

Subject: Re: deep copy of QStringList
From: Thiago Macieira
Date: Thu, 2 Oct 2008 18:30:16 +0200
On Thursday 02 October 2008 17:48:01 dejfson wrote:
> What you say is of course true, however i'm not really interested in
> passing the copy of the data, because if my thread process decides to
> change them, both thread and data users must use QMutex to lock the access.

No, you don't need to use a QMutex to lock it. It's fine to use without, 
provided you're accessing different objects. If they are shared, QStringList 
will create a copy for you when detaching.

Thiago Josà Macieira - thiago.macieira AT nokia.com
Senior Software Engineer - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
<Prev in Thread] Current Thread [Next in Thread>