projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
core/refs: fix drop condition
[nihav.git]
/
nihav-core
/
src
/
refs.rs
diff --git
a/nihav-core/src/refs.rs
b/nihav-core/src/refs.rs
index de1c4fc3b5f7809120bdce7b0e93a82105892287..023a2136ad99fdafebe5d653957eb372e2f22cae 100644
(file)
--- a/
nihav-core/src/refs.rs
+++ b/
nihav-core/src/refs.rs
@@
-18,7
+18,7
@@
impl<T> NABufferData<T> {
obj.refs.fetch_add(1, Ordering::SeqCst);
}
fn dec_refs(obj: &mut Self) -> bool {
- obj.refs.fetch_sub(1, Ordering::SeqCst) ==
0
+ obj.refs.fetch_sub(1, Ordering::SeqCst) ==
1
}
fn get_num_refs(obj: &Self) -> usize {
obj.refs.load(Ordering::Relaxed)