         observer?.databaseWillChange(with: event)
     }
     #endif
-    
-    private func transactionDidComplete() {
-        switch extent {
-        case .observerLifetime, .databaseLifetime:
-            break
-        case .nextTransaction:
-            weakObserver = nil
-            strongObserver = nil
-        }
-    }
 }
 
 /// A kind of database event. See Database.add(transactionObserver:)

    }
    
    func databaseDidCommit(_ db: Database) {
        transactionDidComplete()
        observer?.databaseDidCommit(db)
    }
    
    func databaseDidRollback(_ db: Database) {
        transactionDidComplete()
        observer?.databaseDidRollback(db)
    }
    
    #if SQLITE_ENABLE_PREUPDATE_HOOK

        case .observerLifetime:
            weakObserver = observer
        case .nextTransaction:
            // This strong reference will be released in databaseDidCommit() and databaseDidRollback()
            strongObserver = observer
        case .databaseLifetime:
            strongObserver = observer
