mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-30 00:05:11 +00:00
Merge pull request #64 from realm/tg/leak
Fix the initial ref count for WeakRealmNotifier
This commit is contained in:
commit
c07fb9c963
@ -34,7 +34,7 @@ WeakRealmNotifier::WeakRealmNotifier(const std::shared_ptr<Realm>& realm, bool c
|
||||
};
|
||||
|
||||
CFRunLoopSourceContext ctx{};
|
||||
ctx.info = new RefCountedWeakPointer{realm, {1}};
|
||||
ctx.info = new RefCountedWeakPointer{realm, {0}};
|
||||
ctx.perform = [](void* info) {
|
||||
if (auto realm = static_cast<RefCountedWeakPointer*>(info)->realm.lock()) {
|
||||
realm->notify();
|
||||
|
Loading…
x
Reference in New Issue
Block a user