Skip to content

Commit 76261c1

Browse files
committed
delete dispatcher objs correctly
Fix crash on quit after reloadDev
1 parent f8216fa commit 76261c1

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
@@ -59,9 +59,8 @@ DispatcherHost::~DispatcherHost() {
5959
g_dispatcher_host_map.erase(render_view_host());
6060
std::set<int>::iterator it;
6161
for (it = objects_.begin(); it != objects_.end(); it++) {
62-
if (Base* obj = GetApiObject(*it)) {
63-
delete obj;
64-
}
62+
if (objects_registry_.Lookup(*it))
63+
objects_registry_.Remove(*it);
6564
}
6665
}
6766

0 commit comments

Comments
 (0)