Skip to content

Commit

Permalink
Fixed memory management.
Browse files Browse the repository at this point in the history
This is somewhat pointless because (at least now) the recorder's `init` method will always throw an exception. It avoids an analyser warning, though. See #456 for details.
  • Loading branch information
erikdoe committed May 11, 2021
1 parent 09a9504 commit b9c7fb9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Source/OCMock/OCMockObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ - (instancetype)init
if(recorder != nil)
{
[recorder setMockObject:self];
#ifndef __clang_analyzer__
// see #456 for details
return (id)[recorder init];
#endif
return (id)[[recorder retain] init];
}
return self;
}
Expand Down

0 comments on commit b9c7fb9

Please sign in to comment.