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

Unified Diff: runtime/bin/utils_win.h

Issue 1781883002: Fixes some memory leaks in //runtime/bin (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix tests on Windows Created 4 years, 9 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/socket_win.cc ('k') | runtime/bin/utils_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/utils_win.h
diff --git a/runtime/bin/utils_win.h b/runtime/bin/utils_win.h
index 92de84e661403c5ffa7478d35dcab5e18a3e72a4..b8f9fbcc1676523780cb59f4a63226d4098b93d6 100644
--- a/runtime/bin/utils_win.h
+++ b/runtime/bin/utils_win.h
@@ -12,6 +12,11 @@ namespace bin {
void FormatMessageIntoBuffer(DWORD code, wchar_t* buffer, int buffer_length);
+// These string utility functions return strings that have been allocated with
+// Dart_ScopeAllocate(). They should be used only when we are inside an API
+// scope. If a string returned by one of these functions must persist beyond
+// the scope, then copy the results into a suitable buffer that you have
+// allocated.
class StringUtilsWin {
public:
static char* WideToUtf8(wchar_t* wide,
« no previous file with comments | « runtime/bin/socket_win.cc ('k') | runtime/bin/utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698