Permalink
Browse files

now ignoring autorelease.

  • Loading branch information...
1 parent 24783f4 commit 1e8f4e519e6f63e9097a4f83b5b6e1ba29ea128f @ccgus committed Jan 8, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 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);

0 comments on commit 1e8f4e5

Please sign in to comment.