Closed alanterranova closed 4 years ago
Hi. Any chances this pull request will be merged?
Assuming that I merge #360, would that work for you, too?
Even after thinking about it in depth, I didn't come up with an approach that would solve the issue automatically. Either you have to tell OCMock early not to retain the arguments, as proposed here, or you tell it later to release them, as proposed in #360. I've decided for the latter because the approach proposed here can lead to unpredictable crashes.
OCMock 3.4 retains arguments passed to mocks (https://github.com/erikdoe/ocmock/issues/307) so this provides reverse-compatibility for tests that rely on dealloc being called on the object under test, which was fine in OCMock 3.2 and earlier versions.