On 11/24/2012 06:02 PM, Liu Ping Fan wrote: > - obj->ref--; > > /* parent always holds a reference to its children */ > - if (obj->ref == 0) { > + if (__sync_fetch_and_sub(&obj->ref, 1) == 1) {
if (__sync_sub_and_fetch(&obj->ref, 1) == 0) r~
On 11/24/2012 06:02 PM, Liu Ping Fan wrote: > - obj->ref--; > > /* parent always holds a reference to its children */ > - if (obj->ref == 0) { > + if (__sync_fetch_and_sub(&obj->ref, 1) == 1) {
if (__sync_sub_and_fetch(&obj->ref, 1) == 0) r~