Releasing Memory used by CouchBase Documents

30 views
Skip to first unread message

Arash Ashrafi

unread,
Jul 11, 2014, 12:05:22 PM7/11/14
to mobile-c...@googlegroups.com

Here is the scenario:

1. I read some documents (view-query) from a CouchBase Lite database and add that to self.someCouchDocs.
2. I use self.someCouchDocs at some point.
3. When I don't need it any more, I want to get rid of it and release the memory used by that.
4. I set self.someCouchDocs to nil. But, the memory does not seem to be released.

Is there anyway to release those object from memory?

Jens Alfke

unread,
Jul 11, 2014, 4:27:52 PM7/11/14
to mobile-c...@googlegroups.com

On Jul 11, 2014, at 9:05 AM, Arash Ashrafi <arashe...@gmail.com> wrote:

> Is there anyway to release those object from memory?

Couchbase Lite caches a limited number of recently used documents in memory; I think the number is 50. (Only the bodies are cached, not attachments.) This should’t cause memory problems; if it does, you should consider splitting up your documents into something smaller, or moving the large data into attachments.

—Jens
Reply all
Reply to author
Forward
0 new messages