mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-18 19:40:19 +00:00
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:
parent
1316389f10
commit
04ec602500
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user