Skip to content

Commit b9c7fb9

Browse files
committed
Fixed memory management.
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 erikdoe#456 for details.
1 parent 09a9504 commit b9c7fb9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Source/OCMock/OCMockObject.m

+1-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ - (instancetype)init
9898
if(recorder != nil)
9999
{
100100
[recorder setMockObject:self];
101-
#ifndef __clang_analyzer__
102-
// see #456 for details
103-
return (id)[recorder init];
104-
#endif
101+
return (id)[[recorder retain] init];
105102
}
106103
return self;
107104
}

0 commit comments

Comments
 (0)