[fbreader] Fixed incorrect use of atomic builtins
Which resulted in memory leaks
This commit is contained in:
parent
c243a75376
commit
b70dd1bcf9
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ template<class T>
|
|||
inline unsigned int shared_ptr_storage<T>::removeWeakReference() {
|
||||
#if FBREADER_USE_GNUC_SYNC_BUILTINS
|
||||
__sync_fetch_and_sub(&myWeakCounter, 1);
|
||||
return __sync_add_and_fetch(&myTotalCount, 1);
|
||||
return __sync_sub_and_fetch(&myTotalCount, 1);
|
||||
#else
|
||||
--myWeakCounter;
|
||||
return counter();
|
||||
|
|
Loading…
Reference in a new issue