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

Public Database.close method

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0
    • Component/s: API
    • Security Level: Public
    • Labels:
      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

          Hide
          pasin Pasin Suriyentrakorn added a comment -

          Close as not applicable for 2.0.

          Show
          pasin Pasin Suriyentrakorn added a comment - Close as not applicable for 2.0.

            People

            Assignee:
            pasin Pasin Suriyentrakorn
            Reporter:
            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