Find keeps query objects in heap memory
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue
I have a table that has several documents that reach close to 2mb ~ 4mb and I use the find method to search just some fields in these documents and with some specific filters. I always work with creating indexes for these queries and it all works very well.
Recently I have noticed a significant increase in the application's memory consumption in some processes and they all involve the find method.
It seems that even after the promise is completed, the objects that the library uses maintains the connection with the object in memory, preventing the garbage collector from removing these objects.
Only after a new query is executed are the objects "released" and the garbage collector can do its work.

### Info
- Environment: Browser, AngularJS, PouchDB 7.2.1
- Platform: Chrome
- Adapter: indexeddb
- Server: CouchDB
Contributor guide
Assessment
This issue has not been assessed yet.