Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some fixes for BatchProxy

  • Loading branch information...
commit cd0c15b9972f14d8f182deb041aa8442ba142280 1 parent 66acdc0
@stevedekorte authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 ActorKit/BatchProxy.m
View
10 ActorKit/BatchProxy.m
@@ -67,12 +67,10 @@ - (void)forwardInvocation:(NSInvocation *)anInvocation
}
);
- NSMutableArray *resultsArray = [NSMutableArray arrayWithCapacity:length];
-
- for(size_t i = 0; i < length; i ++)
- {
- [resultsArray addObject:results[i]];
- }
+ NSMutableArray *resultsArray = [NSMutableArray
+ arrayWithObjects:results count:length];
+
+ free(results); //NSArray docs don't mention who owns the memory, so assume it's a copy
[anInvocation setReturnValue:(void *)&resultsArray];
}
Please sign in to comment.
Something went wrong with that request. Please try again.