diff --git a/iphone/Classes/KrollBridge.m b/iphone/Classes/KrollBridge.m index 83f72dc63bd..4cece814d0c 100644 --- a/iphone/Classes/KrollBridge.m +++ b/iphone/Classes/KrollBridge.m @@ -297,7 +297,7 @@ -(void)removeProxies { OSSpinLockLock(&proxyLock); CFDictionaryRef oldProxies = registeredProxies; - registeredProxies = NULL; + CFRelease(registeredProxies); OSSpinLockUnlock(&proxyLock); for (id thisProxy in (NSDictionary *)oldProxies) @@ -688,7 +688,7 @@ -(void)registerProxy:(id)proxy krollObject:(KrollObject *)ourKrollObject - (id)registerProxy:(id)proxy { - KrollObject * ourKrollObject = [self krollObjectForProxy:proxy]; + KrollObject * ourKrollObject = [[self krollObjectForProxy:proxy] autorelease]; if (ourKrollObject != nil) {