We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3ef455 commit 3b7716aCopy full SHA for 3b7716a
samples/embedder/run_kernel.cc
@@ -73,7 +73,9 @@ std::string ReadSnapshot(std::string_view path) {
73
74
char* bytes = static_cast<char*>(std::malloc(length));
75
source_file.read(bytes, length);
76
- return std::string(bytes, length);
+ auto result = std::string(bytes, length);
77
+ std::free(bytes);
78
+ return result;
79
}
80
81
Dart_Handle ToDartStringList(const std::vector<std::string>& values) {
@@ -122,6 +124,7 @@ int main(int argc, char** argv) {
122
124
123
125
// Start an isolate from a platform kernel.
126
Dart_IsolateFlags isolate_flags;
127
+ Dart_IsolateFlagsInitialize(&isolate_flags);
128
129
Dart_CreateIsolateGroupFromKernel(
130
/*script_uri=*/snapshot_uri.c_str(),
0 commit comments