We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fb68dc commit b43bcefCopy full SHA for b43bcef
aten/src/TH/THStorage.hpp
@@ -19,11 +19,13 @@
19
// plus one more if refcount > 0
20
//
21
// - THStorage stays live as long as there are any strong
22
-// or weak pointers to it (refcount > 0 || weakcount > 0)
+// or weak pointers to it (weakcount > 0, since strong
23
+// references count as a +1 to weakcount)
24
25
// - finalizers are called and data_ptr is deallocated when refcount == 0
26
-// - Once refcount == 0, it can never again be > 0 (it's monotonic)
27
+// - Once refcount == 0, it can never again be > 0 (the transition
28
+// from > 0 to == 0 is monotonic)
29
30
// - When you access THStorage via a weak pointer, you must
31
// atomically increment the use count, if it is greater than 0.
0 commit comments