Skip to content

Commit

Permalink
fix(ios): iterate over copy of registeredProxies keys not dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed May 23, 2019
1 parent bc673ec commit 4a0cf96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/KrollBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ - (void)didReceiveMemoryWarning:(NSNotification *)notification
signed long proxiesCount = CFDictionaryGetCount(registeredProxies);
OSSpinLockUnlock(&proxyLock);

//During a memory panic, we may not get the chance to copy proxies.
// During a memory panic, we may not get the chance to copy proxies.
while (keepWarning) {
keepWarning = NO;

for (id proxy in (NSDictionary *)registeredProxies) {
for (id proxy in [(NSDictionary*)registeredProxies allKeys]) {
[proxy didReceiveMemoryWarning:notification];

OSSpinLockLock(&proxyLock);
Expand Down

0 comments on commit 4a0cf96

Please sign in to comment.