erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

Retain class type arguments in NSInvocation #350

Closed jackwu95 closed 6 years ago

jackwu95 commented 6 years ago

The arguments passed to the recorder for a method-parameter of type Class were not retained, which can cause crashes if they are deallocated before they are used for verification.

As Class types are treated with as objects in ObjC, we should just retain them in the same way.