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

Unified Diff: samples/pdfium_test.cc

Issue 2068563002: Fix memory leaks with V8 startup data. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 6 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 | testing/embedder_test.cpp » ('j') | testing/embedder_test.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/pdfium_test.cc
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 5ee14642e4b7993f2d5de807f67f7427ca65ddfb..4f95caa60162928eb4139415e239de9d69d3c54c 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -839,6 +839,11 @@ int main(int argc, const char* argv[]) {
#ifdef PDF_ENABLE_V8
v8::V8::ShutdownPlatform();
delete platform;
+
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+ free(const_cast<char*>(natives.data));
+ free(const_cast<char*>(snapshot.data));
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
#endif // PDF_ENABLE_V8
return 0;
« no previous file with comments | « no previous file | testing/embedder_test.cpp » ('j') | testing/embedder_test.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698