Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

now ignoring autorelease.

  • Loading branch information...
commit 1e8f4e519e6f63e9097a4f83b5b6e1ba29ea128f 1 parent 24783f4
@ccgus authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 mocha/Utilities/MOUtilities.m
View
6 mocha/Utilities/MOUtilities.m
@@ -306,6 +306,12 @@ JSValueRef MOFunctionInvoke(id function, JSContextRef ctx, size_t argumentCount,
target = [[target objectClass] alloc];
}
+ // Make sure autorelease is ignored, since we do our own reference counting.
+ if (selector == NSSelectorFromString(@"autorelease")) {
+ NSLog(@"Ignoring autorelease call on %@", target);
+ return [runtime JSValueForObject:target];
+ }
+
Method method = NULL;
BOOL classMethod = (target == klass);
Please sign in to comment.
Something went wrong with that request. Please try again.