Skip to content

Commit 0430bac

Browse files
committed
delete dispatcher objs correctly
Fix crash on quit after reloadDev
1 parent def2409 commit 0430bac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/api/dispatcher_host.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ DispatcherHost::~DispatcherHost() {
6060
g_dispatcher_host_map.erase(render_view_host());
6161
std::set<int>::iterator it;
6262
for (it = objects_.begin(); it != objects_.end(); it++) {
63-
if (Base* obj = GetApiObject(*it)) {
64-
delete obj;
65-
}
63+
if (objects_registry_.Lookup(*it))
64+
objects_registry_.Remove(*it);
6665
}
6766
}
6867

0 commit comments

Comments
 (0)