Skip to content

Commit c07fb9c

Browse files
committed
Merge pull request #64 from realm/tg/leak
Fix the initial ref count for WeakRealmNotifier
2 parents e4ace9c + 273db05 commit c07fb9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/impl/apple/weak_realm_notifier.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ WeakRealmNotifier::WeakRealmNotifier(const std::shared_ptr<Realm>& realm, bool c
3434
};
3535

3636
CFRunLoopSourceContext ctx{};
37-
ctx.info = new RefCountedWeakPointer{realm, {1}};
37+
ctx.info = new RefCountedWeakPointer{realm, {0}};
3838
ctx.perform = [](void* info) {
3939
if (auto realm = static_cast<RefCountedWeakPointer*>(info)->realm.lock()) {
4040
realm->notify();

0 commit comments

Comments
 (0)