I'm using a weak objects NSHashTable that is reporting a count of 1 even though it's empty. The following is lldb output displaying my case.
p [__operationWaitList count]
(NSUInteger) $4 = 1
p [__operationWaitList.allObjects count]
(NSUInteger) $7 = 0
My best guess is that count
counts the number of weak references stored in the NSHashTable rather than the number of valid objects. By calling allObjects however I'm dereferencing the pointers which uncovers that there are no valid objects, hence the resulting object array is empty.
I'd like confirmation of this since the documentation is a bit lacking on this point.