Closed jasonwurzel closed 6 years ago
This is something that I've noticed on the masks branch (not merged yet) and I was about to investigate further. Thank you very much for the bug report!
This is very simple for the DrawRect methods, but not that much for the ones that support gradient (DrawPath and DrawText), since they cache things on the GradientFillContent and GradientStrokeContent. This should actually be a property of the Paint class.
I will look further into this.
Please, get the my get latest and see if the bug is fixed.
Hi Alexandre, yes, this looks much better :-)
I'm going to mark this as closed. Again, thank you very much for the report!
Hi Alexandre ,
I'm using your nice port extensively. When having several LottieAnimationView on screen I observed severe memory consumption of my app ( 10 AnimationViews resulting in about 3mb / sec Memory growth). So I dug into the source code and I think I found the issue (though I'm not 100% sure of the root cause). In BitmapCanvas.DrawPath a Geometry and a Brush get created but never get disposed (after getting handed over to _drawingSession.DrawGeometry respectively _drawingSession.FillGeometry). Please see the following excerpt of BitmapCanvas:
of course this has to be changed to using statements and there are other places where this is applicable, I think (DrawRect for example). What do you think? should I create a pull request for this?
Greetings, Michael