We are opening the connection on _$.indexedDB(INDEXEDDBDATABASENAME) but we are not closing it after operation is successfully completed or we do not have method exposed to close connection. Connection is only get closed when "onversionchange" event occur.
This way connection is always opened and causing memory leak.
To reproduce this I have tried on "http://nparashuram.com/jquery-indexeddb/example/index.html" to move (3)product to cart and again back to catalog. It is leaking around 38KB for connection and 60KB for closure(onversionchange).
I am attaching the memory heap snapsort and the changed indexedDB library.
Existing Library :
New Implementation :
I am attaching the zip file of new source code if its look good to you please update the library.
jquery.indexeddb.js.zip
We are opening the connection on _$.indexedDB(INDEXEDDBDATABASENAME) but we are not closing it after operation is successfully completed or we do not have method exposed to close connection. Connection is only get closed when "onversionchange" event occur.
This way connection is always opened and causing memory leak. To reproduce this I have tried on "http://nparashuram.com/jquery-indexeddb/example/index.html" to move (3)product to cart and again back to catalog. It is leaking around 38KB for connection and 60KB for closure(onversionchange).
I am attaching the memory heap snapsort and the changed indexedDB library.
Existing Library :![image](https://user-images.githubusercontent.com/21074485/74668768-e5feee80-5173-11ea-99c7-ccce1752c559.png)
New Implementation :![image](https://user-images.githubusercontent.com/21074485/74668329-fe223e00-5172-11ea-8cc5-dc6e450dc354.png)
I am attaching the zip file of new source code if its look good to you please update the library. jquery.indexeddb.js.zip