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.
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 aNode
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.