-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
You can make a weak reference array as follows:
@implementation NSMutableArray (EngineEventSubscriber)
- (id)mutableArrayUsingWeakReferences
{
return [self mutableArrayUsingWeakReferencesWithCapacity:0];
} - (id)mutableArrayUsingWeakReferencesWithCapacity:(NSUInteger)capacity
{
CFArrayCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual};
// We create a weak reference array
return (__bridge id) (CFArrayCreateMutable(0, capacity, &callbacks));
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels