Closed jack-tutor closed 1 year ago
Calling node.cache()
should not produce any leaks. A new cache just overwrite the old one. There is no global cache, only cache per node. So if a node is destroyed, or you cleared cache manually with node.clearCache()
all should be ok.
You need to run a memory profile to see what is leaking.
Hi, I am working on a web app that frequently has images streamed to it. We render these images using
react-konva
- and on one set of images, we are applying a filter a la: https://konvajs.org/docs/react/Filters.htmlThis means that we are consistently calling
.cache()
though on the sameuseRef
attached to the sameKonvaImage
component.The web app has a memory leak which appears to be due to images, though not necessarily react-konva. I'm lookiing to find out:
.cache
be expected to cause a memory leak in this scenarioclearCache
but the impact of this function is unclear to me)Thanks