Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-320

Public Database.close method

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 2.8.0
    • None
    • API
    • Security Level: Public
    • None

    Description

      Some apps may use large or indefinite numbers of databases, e.g. a database per document, and need a way to close a database to reclaim memory. (See this thread for instance.)

      Also filed as couchbase/couchbase-lite-ios#429

      I made the signature of the Obj-C method look like this:

       

      • (BOOL) close: (NSError**)error;
        The actual closing of the database can't fail, but it first saves changes to all CBLModel objects, and that might cause errors (most likely conflicts or validation issues.)

      On platforms that use exceptions for signaling errors, this wouldn't affect the signature of this method, bu the docs should point out that it can fail if a model fails to save.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            pasin Pasin Suriyentrakorn
            daniel.petersen Daniel Petersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty