manubb / Leaflet.PixiOverlay

Bring Pixi.js power to Leaflet maps
MIT License
463 stars 85 forks source link

_renderer is not destroyed #32

Closed cokicm closed 1 year ago

cokicm commented 4 years ago

_renderer created at line 106 is not destroyed. On creating multiple PixiOverlays, video memory allocated at this place leaks.

If the field is destroyed by calling _renderer.destroy(), GPU memory is freed.

Probably PixiOverlay should have its own destroy() method that should destroy _renderer and possibly _auxRenderer as well.

manubb commented 4 years ago

Thanks for reporting. I will fix this but i need some time to think about it.

manubb commented 1 year ago

It has taken more time than expected but it is included in leaflet-pixi-overlay@1.9.3.