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

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

$
0
0

The simplest solution:

NSMutableArray *array = (__bridge_transfer NSMutableArray *)CFArrayCreateMutable(nil, 0, nil);NSMutableDictionary *dictionary = (__bridge_transfer NSMutableDictionary *)CFDictionaryCreateMutable(nil, 0, nil, nil);NSMutableSet *set = (__bridge_transfer NSMutableSet *)CFSetCreateMutable(nil, 0, nil);

Note: And this works on iOS 4.x too.


Viewing all articles
Browse latest Browse all 13

Trending Articles



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