     // MARK: - Observing
     
     private func observeSortSetting() {
-        disposable = observe(\.ascending) { [unowned self] newValue in
-            self.engine.sort(ascending: newValue)
-            self.configureNavigationBar()
-            self.viewRealm.tableView.reloadData()
+        disposable = observe(\.ascending) { [weak self] newValue in
+            self?.engine.sort(ascending: newValue)
+            self?.configureNavigationBar()
+            self?.viewRealm.tableView.reloadData()
         }
     }
     


final class RBSRealmBrowserView: UIView {
    private(set) var tableView: UITableView
    init() {
        tableView = UITableView(frame: .zero, style: .plain)
        super.init(frame: .zero)

        let size = CGSize(width: min(maxWidth, bounds.size.width), height: bounds.size.height)
        var xPos: CGFloat = 0.0
        if size.width >= maxWidth {
            xPos = (bounds.size.width - size.width) / 2.0
        }
        let origin = (CGPoint(x: xPos, y: 0.0))
        tableView.frame = (CGRect(origin: origin, size: size))
