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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 1892623002: Fixes leak of native File objects. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unused GetFD 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
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 258b9a72850901574b3a6519cbec3c488849dc25..448fd28cbddf8c0d8ffb0e6d37521bf239697703 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -214,7 +214,7 @@ static void WriteSnapshotFile(const char* filename,
if (!file->WriteFully(buffer, size)) {
Log::PrintErr("Error: Failed to write snapshot file.\n\n");
}
- delete file;
+ file->Release();
}

Powered by Google App Engine
This is Rietveld 408576698