Skip to content
Browse files

Applying fix manually from jmoody

  • Loading branch information...
1 parent c954c9c commit f5b2f4af61c4c40e195e1e7db6f18bec84f854dc @gabriel gabriel committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 Classes/GHTest/GHTesting.m
View
8 Classes/GHTest/GHTesting.m
@@ -251,12 +251,14 @@ - (NSArray *)loadTestsFromTarget:(id)target {
if (strstr(name, "test") == name) {
returnType = method_copyReturnType(currMethod);
if (returnType) {
+ // @gabriel from jjm - this does not appear to work, i am seeing
+ // memory leaks on exceptions
// This handles disposing of returnType for us even if an
// exception should fly. Length +1 for the terminator, not that
// the length really matters here, as we never reference inside
// the data block.
- [NSData dataWithBytes:returnType
- length:strlen(returnType) + 1];
+ //[NSData dataWithBytes:returnType
+ // length:strlen(returnType) + 1];
}
}
// TODO: If a test class is a subclass of another, and they reuse the
@@ -273,8 +275,10 @@ - (NSArray *)loadTestsFromTarget:(id)target {
[invocation setSelector:sel];
[invocations addObject:invocation];
}
+ if (returnType != NULL) free(returnType);
}
}
+ if (methods != NULL) free(methods);
}
// Match SenTestKit and run everything in alphbetical order.
[invocations sortUsingFunction:MethodSort context:nil];

0 comments on commit f5b2f4a

Please sign in to comment.
Something went wrong with that request. Please try again.