Hi!
You use vg.loadPicture in the _loadAsync method and you must call Picture.dispose when you are done with the pictureInfo.picture. But I don't see in your code any mention of disposing.
An Image widget using your Svg ImageProvider gets from the provider an ImageInfo with the ui.Image taken from pictureInfo.picture.toImage, and when the Image widget is done, it calls ui.Image.dispose but not Picture.dispose, so all resources of the Picture used for rasterizing the image stay in memory.
Hi! You use
vg.loadPicture
in the_loadAsync
method and you must callPicture.dispose
when you are done with thepictureInfo.picture
. But I don't see in your code any mention of disposing.An
Image
widget using yourSvg
ImageProvider gets from the provider anImageInfo
with theui.Image
taken frompictureInfo.picture.toImage
, and when the Image widget is done, it callsui.Image.dispose
but notPicture.dispose
, so all resources of thePicture
used for rasterizing the image stay in memory.