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

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: 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
« no previous file with comments | « no previous file | runtime/bin/file.h » ('j') | runtime/bin/file.h » ('J')
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 764c00ecf0b311ae4afef90f0048f3f7928a15c8..934ff1262fc9ce027180bfabbba70df25e0334a4 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') | runtime/bin/file.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698