Re: [Interest] reference counting

2014-11-17 Thread René J . V . Bertin
On Monday November 17 2014 09:03:48 Thiago Macieira wrote: > Yes, it's thread-safe. OK, thanks. :) R. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] reference counting

2014-11-17 Thread Thiago Macieira
On Monday 17 November 2014 12:54:59 René J.V. Bertin wrote: > Out of curiosity: is QEventLoopLocker thread-safe? That is, can the lock be > set (increased aka reference counter increment) in a background thread and > unset (decreased aka reference counter decrement) in the main thread? This > happ

Re: [Interest] reference counting

2014-11-16 Thread René J . V . Bertin
On Sunday November 16 2014 11:31:51 Thiago Macieira wrote: > On Sunday 16 November 2014 10:58:01 René J.V. Bertin wrote: > > (I was arguing to do the same for KDE's global reference counting that used > > a simple int ... and can cause the app to quit when the counter reaches 0 > > ...) > > You me

Re: [Interest] reference counting

2014-11-16 Thread Thiago Macieira
On Sunday 16 November 2014 10:58:01 René J.V. Bertin wrote: > (I was arguing to do the same for KDE's global reference counting that used > a simple int ... and can cause the app to quit when the counter reaches 0 > ...) You mean QEventLoopLocker? -- Thiago Macieira - thiago.macieira (AT) intel.c

Re: [Interest] reference counting

2014-11-16 Thread René J . V . Bertin
On Sunday November 16 2014 18:46:50 Sean Harmer wrote: > An atomic integer is used. See for e.g. QVector which uses QArrayData which > in > turn uses QtPrivate::RefCount which in turn uses QBasicAtomicInt. Good, I was actually hoping to hear that :) (I was arguing to do the same for KDE's globa

Re: [Interest] reference counting

2014-11-16 Thread Sean Harmer
On Sunday 16 November 2014 19:02:19 René J.V. Bertin wrote: > On Sunday November 16 2014 18:47:34 Giuseppe D'Angelo wrote: > > Most of the value classes are implicitly shared: > > > > http://qt-project.org/doc/qt-5/implicit-sharing.html > > Yes, I saw that doc (also in Qt4). What kind of sharing

Re: [Interest] reference counting

2014-11-16 Thread René J . V . Bertin
On Sunday November 16 2014 18:47:34 Giuseppe D'Angelo wrote: > Most of the value classes are implicitly shared: > > http://qt-project.org/doc/qt-5/implicit-sharing.html > Yes, I saw that doc (also in Qt4). What kind of sharing does this refer to - across threads and/or only across owners in a

Re: [Interest] reference counting

2014-11-16 Thread Giuseppe D'Angelo
Il 16/11/2014 18:37, René J.V. Bertin ha scritto: I thought Qt had support for reference counting (e.g. comparable to ObjC's retain/release) but after checking a few likely suspect classes I cannot seem to find anything of the sort. Was I mistaken, or is it implemented in a different way? Most

[Interest] reference counting

2014-11-16 Thread René J . V . Bertin
Hi, I thought Qt had support for reference counting (e.g. comparable to ObjC's retain/release) but after checking a few likely suspect classes I cannot seem to find anything of the sort. Was I mistaken, or is it implemented in a different way? Cheers, René _