Index: runtime/bin/isolate_data.cc |
diff --git a/runtime/bin/isolate_data.cc b/runtime/bin/isolate_data.cc |
index 1cf3ebe3d848ddc6613a0f9c6efdf6cce14e5c4d..f3eafa02bf575b63b4450243ac99e907b7c1002a 100644 |
--- a/runtime/bin/isolate_data.cc |
+++ b/runtime/bin/isolate_data.cc |
@@ -5,6 +5,8 @@ |
#include "bin/isolate_data.h" |
#include "bin/snapshot_utils.h" |
+#include "vm/kernel.h" |
+ |
namespace dart { |
namespace bin { |
@@ -16,6 +18,7 @@ IsolateData::IsolateData(const char* url, |
package_root(NULL), |
packages_file(NULL), |
udp_receive_buffer(NULL), |
+ kernel_program(NULL), |
builtin_lib_(NULL), |
loader_(NULL), |
app_snapshot_(app_snapshot), |
@@ -46,6 +49,10 @@ IsolateData::~IsolateData() { |
packages_file = NULL; |
free(udp_receive_buffer); |
udp_receive_buffer = NULL; |
+ if (kernel_program != NULL) { |
+ delete reinterpret_cast<kernel::Program*>(kernel_program); |
+ kernel_program = NULL; |
+ } |
delete app_snapshot_; |
app_snapshot_ = NULL; |
} |