Realm

A Realm instance (also referred to as a realm) represents a Realm database.

Realms can either be stored on disk (see init(path:)) or in memory (see init(inMemoryIdentifier:)).

Realm instances are cached internally, and constructing equivalent Realm objects (with the same path or identifier) produces limited overhead.

If you specifically want to ensure a Realm object is destroyed (for example, if you wish to open a realm, check some property, and then possibly delete the realm file and re-open it), place the code which uses the realm within an autoreleasepool {} and ensure you have no other strong references to it.

  • A Configuration is used to describe the different options used to create a Realm instance.

    See more

    Declaration

    Swift

    public struct Configuration
  • Returns a human-readable description of the configuration.

    Declaration

    Swift

    public var description: String