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

Unified Diff: runtime/bin/dartutils.cc

Issue 1892623002: Fixes leak of native File objects. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 8 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 | « no previous file | runtime/bin/file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 39f147a5a6991afe85f385b44e34ec45d636dfba..396b116fdd6d6dadb4b3fff83cba50a42d8796e2 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -222,7 +222,8 @@ void DartUtils::WriteFile(const void* buffer,
void DartUtils::CloseFile(void* stream) {
- delete reinterpret_cast<File*>(stream);
+ File* file = reinterpret_cast<File*>(stream);
+ file->Release();
}
« no previous file with comments | « no previous file | runtime/bin/file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698