Quantcast
Channel: NSArray of weak references (__unsafe_unretained) to objects under ARC - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by user187676 for NSArray of weak references (__unsafe_unretained) to objects under ARC

$
0
0

If you do not require a specific order you could use NSMapTable with special key/value options

NSPointerFunctionsWeakMemory

Uses weak read and write barriers appropriate for ARC or GC. Using NSPointerFunctionsWeakMemory object references will turn to NULL on last release.


Viewing all articles
Browse latest Browse all 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>