Skip to content

Commit

Permalink
Fixed super selector leak for ALL cases
Browse files Browse the repository at this point in the history
  • Loading branch information
parmanoir committed Aug 3, 2011
1 parent 2541dfa commit 71c1c7f
Show file tree
Hide file tree
Showing 2 changed files with 749 additions and 760 deletions.
6 changes: 2 additions & 4 deletions JSCocoa/JSCocoaController.m
Expand Up @@ -4768,12 +4768,10 @@ static JSValueRef jsCocoaObject_callAsFunction(JSContextRef ctx, JSObjectRef fun
{
JSStringRef resultStringJS = JSValueToStringCopy(ctx, arguments[1], NULL);
superSelector = (NSString*)JSStringCopyCFString(kCFAllocatorDefault, resultStringJS);
[superSelector autorelease];
JSStringRelease(resultStringJS);
if (callingSwizzled) {
NSString* previousSelector = superSelector;
if (callingSwizzled)
superSelector = [NSString stringWithFormat:@"%@%@", OriginalMethodPrefix, superSelector];
[previousSelector release];
}
}

// Swizzled handling : we're just changing the selector
Expand Down

0 comments on commit 71c1c7f

Please sign in to comment.