pinch-zoom-canvas
                                
                                 pinch-zoom-canvas copied to clipboard
                                
                                    pinch-zoom-canvas copied to clipboard
                            
                            
                            
                        Allow clearing cache, to avoid leaking of memory
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:

And here you can see the same after I applied this patch:
