Fix memory leak of "handlers_" in cpp example (#1464)
This commit is contained in:
parent
cc0d45a01c
commit
0d1c310e32
@ -172,6 +172,7 @@ class TdExample {
|
|||||||
auto it = handlers_.find(response.request_id);
|
auto it = handlers_.find(response.request_id);
|
||||||
if (it != handlers_.end()) {
|
if (it != handlers_.end()) {
|
||||||
it->second(std::move(response.object));
|
it->second(std::move(response.object));
|
||||||
|
handlers_.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user