mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-19 12:10:55 +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)
|
if (!eventDispatchTable)
|
||||||
{
|
{
|
||||||
// Create the dispatch table for this event.
|
// Create the dispatch table for this event.
|
||||||
eventDispatchTable = [NSMapTable strongToStrongObjectsMapTable];
|
eventDispatchTable = [NSMapTable weakToStrongObjectsMapTable];
|
||||||
[_controlEventDispatchTable setObject:eventDispatchTable forKey:eventKey];
|
[_controlEventDispatchTable setObject:eventDispatchTable forKey:eventKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user