Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection is not close and it is causing Memory leak #74

Open
dipakprajapati91 opened this issue Feb 17, 2020 · 0 comments
Open

Connection is not close and it is causing Memory leak #74

dipakprajapati91 opened this issue Feb 17, 2020 · 0 comments

Comments

@dipakprajapati91
Copy link

dipakprajapati91 commented Feb 17, 2020

We are opening the connection on $.indexedDB(INDEXEDDB_DATABASENAME) 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.

image

Existing Library :
image

New Implementation :
image

I am attaching the zip file of new source code if its look good to you please update the library.
jquery.indexeddb.js.zip

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

No branches or pull requests

1 participant