Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(909)

Unified Diff: runtime/bin/eventhandler_linux.cc

Issue 2231123002: Retry: Fixes memory leaks in the eventhandler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove include of <map> Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_linux.cc
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 59cbdcdfe3fb7fee4ed24434c80c77ca5e4cfdb0..bd61e80801878420fc2d86cd18d1171515a97501 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -127,7 +127,15 @@ EventHandlerImplementation::EventHandlerImplementation()
}
+static void DeleteDescriptorInfo(void* info) {
+ DescriptorInfo* di = reinterpret_cast<DescriptorInfo*>(info);
+ di->Close();
+ delete di;
+}
+
+
EventHandlerImplementation::~EventHandlerImplementation() {
+ socket_map_.Clear(DeleteDescriptorInfo);
VOID_TEMP_FAILURE_RETRY(close(epoll_fd_));
VOID_TEMP_FAILURE_RETRY(close(timer_fd_));
VOID_TEMP_FAILURE_RETRY(close(interrupt_fds_[0]));
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698