I've got an interesting situation in which my test objects are getting leaked when I use the stub method:
[[myMock stub] doSomethingAndCallTarget: theTarget selector: @selector(selectorToCall:)];
This leaks "theTarget". If I use an expect / verify it doesn't leak
[[myMock expect] doSomethingAndCallTarget: theTarget selector: @selector(selectorToCall:)];
// ...
[myMock verify];
Is it needed to retain the parameters here? If so, how can we fix the leak?
It's exacerbated by the fact that we can't clear stubs once we set them. Any workaround solutions would be awesome.