Skip to content

Conversation

@manuelnaranjo
Copy link

The caching feature is super nice, but it's actually risky. If you
start creating big enough objects at a high frequency (less than 1
minute) then the cache starts growing and growing which leads to
a memory leak. This is more notoriuous on mobile devices, and
specially when the module is used to display 16MP images.

Here you can see the memory consumption of my ionic app after 7 creations and destruction's of pinch-zoom-canvas objects:
object-leak

And here you can see the same after I applied this patch:
no-more-leak

The caching feature is super nice, but it's actually risky. If you
start creating big enough objects at a high frequency (less than 1
minute) then the cache starts growing and growing which leads to
a memory leak. This is more notoriuous on mobile devices, and
specially when the module is used to display 16MP images.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant