From c08cd7abb2069b6056ec99c8ec5b87524e45df01 Mon Sep 17 00:00:00 2001 From: thestig Date: Mon, 27 Jun 2016 09:47:59 -0700 Subject: Fix memory leaks with V8 startup data. Review-Url: https://codereview.chromium.org/2068563002 --- samples/pdfium_test.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'samples') diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index 7651205738..f244d8a440 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -882,6 +882,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(natives.data)); + free(const_cast(snapshot.data)); +#endif // V8_USE_EXTERNAL_STARTUP_DATA #endif // PDF_ENABLE_V8 return 0; -- cgit v1.2.3