Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-10 Thread Elvis Stansvik
2016-09-09 1:49 GMT+02:00 Thiago Macieira : > On quinta-feira, 8 de setembro de 2016 21:08:37 PDT Elvis Stansvik wrote: >> > QESDP doesn't actually require that you derive from QSharedData, >> > only that you have an atomic integer called "ref" in your structure. >> >> I see, that makes sense. And

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-10 Thread Konstantin Shegunov
On Thu, Sep 8, 2016 at 11:21 PM, Elvis Stansvik wrote: > (I think you forgot to include the list in your reply) Yes, I'm sorry about that. > I know that it's mentioned in the docs what you bring up (and that > Thiago also brought up), that a QSP manages a *pointer*, while QESDP > manages *dat

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-10 Thread Elvis Stansvik
2016-09-08 23:48 GMT+02:00 Konstantin Shegunov : > On Thu, Sep 8, 2016 at 11:21 PM, Elvis Stansvik wrote: >> >> (I think you forgot to include the list in your reply) > > > Yes, I'm sorry about that. > >> >> I know that it's mentioned in the docs what you bring up (and that >> Thiago also brought

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-10 Thread Thiago Macieira
On quinta-feira, 8 de setembro de 2016 21:08:37 PDT Elvis Stansvik wrote: > > QESDP doesn't actually require that you derive from QSharedData, > > only that you have an atomic integer called "ref" in your structure. > > I see, that makes sense. And I see now that that's really all that > QSharedDa

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-09 Thread Elvis Stansvik
(I think you forgot to include the list in your reply) 2016-09-08 21:48 GMT+02:00 Konstantin Shegunov : > On Thu, Sep 8, 2016 at 8:13 PM, Elvis Stansvik wrote: >> >> Hm, okay. Perhaps a dumb question, but what are the consequences >> internal vs external refcounting for me as a user of these clas

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Elvis Stansvik
2016-09-08 18:50 GMT+02:00 Elvis Stansvik : > Hi all, > > QSharedData and QImplicitlySharedDataPointer (QISDP) is a common > combination used to implement implicit sharing, both in Qt itself and > in Qt-using projects. > > QExplicitlySharedDataPointer (QESDP) is a cousin of QISDP with the > importa

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Elvis Stansvik
2016-09-08 20:33 GMT+02:00 Thiago Macieira : > On quinta-feira, 8 de setembro de 2016 19:13:44 PDT Elvis Stansvik wrote: >> Hm, okay. Perhaps a dumb question, but what are the consequences >> internal vs external refcounting for me as a user of these classes? >> Reading the docs for both of them, b

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Elvis Stansvik
2016-09-08 20:29 GMT+02:00 Thiago Macieira : > On quinta-feira, 8 de setembro de 2016 18:50:48 PDT Elvis Stansvik wrote: >> QExplicitlySharedDataPointer (QESDP) is a cousin of QISDP with the >> important difference that you have to explicitly call detach() to >> detach from the underlying data. >>

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Thiago Macieira
On quinta-feira, 8 de setembro de 2016 19:13:44 PDT Elvis Stansvik wrote: > Hm, okay. Perhaps a dumb question, but what are the consequences > internal vs external refcounting for me as a user of these classes? > Reading the docs for both of them, both seem to have a thread-safe > refcounting mecha

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Thiago Macieira
On quinta-feira, 8 de setembro de 2016 18:50:48 PDT Elvis Stansvik wrote: > QExplicitlySharedDataPointer (QESDP) is a cousin of QISDP with the > important difference that you have to explicitly call detach() to > detach from the underlying data. > > QSharedPointer is Qt's own "smart pointer" to sh

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Elvis Stansvik
2016-09-08 18:57 GMT+02:00 Konstantin Shegunov : > > > On Thu, Sep 8, 2016 at 7:50 PM, Elvis Stansvik wrote: >> >> Hi all, >> QSharedData and QImplicitlySharedDataPointer (QISDP) is a common >> combination used to implement implicit sharing, both in Qt itself and >> in Qt-using projects. > > > QSh

Re: [Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Konstantin Shegunov
On Thu, Sep 8, 2016 at 7:50 PM, Elvis Stansvik wrote: > Hi all, > QSharedData and QImplicitlySharedDataPointer (QISDP) is a common > combination used to implement implicit sharing, both in Qt itself and > in Qt-using projects. > QSharedDataPointer, the implicit part is implicit. ;) > > I'm curi

[Interest] QExplictlySharedDataPointer vs QSharedPointer

2016-09-08 Thread Elvis Stansvik
Hi all, QSharedData and QImplicitlySharedDataPointer (QISDP) is a common combination used to implement implicit sharing, both in Qt itself and in Qt-using projects. QExplicitlySharedDataPointer (QESDP) is a cousin of QISDP with the important difference that you have to explicitly call detach() to