Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Consider implementing Drop for NSAutoreleasePool? #161

Open
daniel-abramov opened this issue Apr 4, 2017 · 0 comments
Open

Consider implementing Drop for NSAutoreleasePool? #161

daniel-abramov opened this issue Apr 4, 2017 · 0 comments

Comments

@daniel-abramov
Copy link

daniel-abramov commented Apr 4, 2017

Does it make sense to implement a Drop trait for NSAutoreleasePool, so it is called whenever NSAutoreleasePool goes out of scope. It turns out that if the user does not call NSAutoreleasePool::drain() / NSAutoreleasePool::release() manually, the memory will be leaked (by the way the examples from the repository do not call drain, release as well).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant