问题
I'm using localforage with its IndexedDB driver for storing simple key-value-pairs. But I encountered a problem when trying to remove or update values.
Whenever I call localforage.removeItem("existingKey")
or localforage.setItem("existingKey", "some value")
with a key of an existing entry no memory is freed.
When using WebSQL instead of IndexedDB the behavior does no occur.
Example on JsBin (Only works in Chrome due to calls to navigator.storage
)
来源:https://stackoverflow.com/questions/47302292/indexeddb-seems-to-not-free-memory