Skip to content

Commit b43bcef

Browse files
committed
CR comments
Signed-off-by: Edward Z. Yang <[email protected]>
1 parent 6fb68dc commit b43bcef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

aten/src/TH/THStorage.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
// plus one more if refcount > 0
2020
//
2121
// - THStorage stays live as long as there are any strong
22-
// or weak pointers to it (refcount > 0 || weakcount > 0)
22+
// or weak pointers to it (weakcount > 0, since strong
23+
// references count as a +1 to weakcount)
2324
//
2425
// - finalizers are called and data_ptr is deallocated when refcount == 0
2526
//
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)
2729
//
2830
// - When you access THStorage via a weak pointer, you must
2931
// atomically increment the use count, if it is greater than 0.

0 commit comments

Comments
 (0)