Skip to content

Conversation

@dmaclach
Copy link
Contributor

This seems like a reasonable expectation of the API and in our case enables code that
depends on stopMocking to function with OCProtocolMockObjects.

…m as part of

dealloc.

This seems like a reasonable expectation of the API and in our case enables code that
depends on stopMocking to function with OCProtocolMockObjects.
[stubs release];
[expectations release];
[exceptions release];
[invocations release];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of not releasing the invocations array?

Copy link
Contributor Author

@dmaclach dmaclach Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it happens in -stopMocking and that I probably thought this was redundant.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell this is the only place.

https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/erikdoe/ocmock%24++%5Binvocations+release%5D&patternType=structural

Removing it here would leak the invocations.

No need to fix on your end, I'll do it while merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants