Questions tagged [nshashtable]

A collection similar to a set, but with broader range of available memory semantics.

An NSHashTable is modeled after a set, although, because of its options, is not a set because it can behave differently (for example, if pointer equality is specified two isEqual strings will both be entered). The major option is to provide for "weak" references that are removed automatically, but at some indefinite point in the future. An NSHashTable can also be configured to operate on arbitrary pointers and not just objects. We recommend the C function API for "void *" access. To configure for pointer use, consult and choose the appropriate NSPointerFunctionsOptions or configure or use an NSPointerFunctions object itself for initialization.

4 questions
7
votes
1 answer

NSHashTable count incorrectly reports non-empty

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…
greg
  • 1,926
  • 17
  • 26
2
votes
2 answers

Inserting default values into list of dicts in Ansible

I have a list of web applications and their configs. Simplified data structure would look like this (list of dicts) web_app_details: - web_sourcedir: UWT_Optimus_UI web_destdir: 'E:\alexsapp' loadUserProfile: false - web_sourcedir:…
0
votes
1 answer

Why do HashTable read operations need to be locked?

The read operation of CopyAndWriteArrayList does not need to be locked, because the write operation will copy the array and will not affect the original array, so the read operation is not locked. So what will happen if the HashTable is not locked?…
dx3906
  • 327
  • 1
  • 4
  • 12
0
votes
0 answers

Hashcode of a string in C with Chaining

I have this assignment where I need to implement string hashcoding with chaining in c++ I,ve already tried it but with int data type only could anyone provide some guidance on how to do it? Should I use another hashcode function ?? I’ve already done…
proxy
  • 1