Skip to content

Commit 576e44c

Browse files
wilhuffa-maurice
authored andcommitted
Call Dispose from the FirestoreInternal destructor.
PiperOrigin-RevId: 316178401
1 parent a3f3e6d commit 576e44c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

firestore/src/ios/firestore_ios.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ FirestoreInternal::FirestoreInternal(
6060
}
6161

6262
FirestoreInternal::~FirestoreInternal() {
63-
std::lock_guard<std::mutex> lock(listeners_mutex_);
64-
HARD_ASSERT_IOS(listeners_.empty(),
65-
"Expected all listeners to be unregistered by the time "
66-
"FirestoreInternal is destroyed.");
63+
{
64+
std::lock_guard<std::mutex> lock(listeners_mutex_);
65+
HARD_ASSERT_IOS(listeners_.empty(),
66+
"Expected all listeners to be unregistered by the time "
67+
"FirestoreInternal is destroyed.");
68+
}
69+
firestore_core_->Dispose();
6770
}
6871

6972
std::shared_ptr<api::Firestore> FirestoreInternal::CreateFirestore(

0 commit comments

Comments
 (0)