Don’t retain an action’s target in ASControlNode

- addTarget:action:forControlEvents: should not retain the target. If it does
then there is a very high likelihood of a retain cycle.
This commit is contained in:
rlasante 2015-05-01 13:04:26 -04:00
parent 1316389f10
commit 04ec602500

View File

@ -226,7 +226,7 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v
if (!eventDispatchTable)
{
// Create the dispatch table for this event.
eventDispatchTable = [NSMapTable strongToStrongObjectsMapTable];
eventDispatchTable = [NSMapTable weakToStrongObjectsMapTable];
[_controlEventDispatchTable setObject:eventDispatchTable forKey:eventKey];
}