Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose renderer when DrawingView is deinit. #763

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Moriquendi
Copy link

We saw that a lot of memory is leaked when creating SVGView this way:
SVGView(node: try! SVGParser.parse(text: path), frame: CGRect())

I did some debugging and I think I found the issue.
DrawingView is not disposing its renderer when it's deinit and so it's leaked. This PR fixes that.

Another way this leaks could be solved (and probably should be to avoid future leaks) is to make animationObservers on a Node a weak array so that it doesn't retain its observers.
It's a little bit of extra work but maybe someone will find some time to implement it.

Cheers.

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.

None yet

1 participant