Chromium Code Reviews| Index: runtime/vm/kernel.h |
| diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h |
| index aae1c28d33813c036fb2ecbc9503a6d66d4f7f4a..69a81c2e442d52a37ca0f292a06ad21bf53cc91c 100644 |
| --- a/runtime/vm/kernel.h |
| +++ b/runtime/vm/kernel.h |
| @@ -116,6 +116,13 @@ class LogicalExpression { |
| class Program { |
| public: |
| + ~Program() { |
| + if (kernel_data_ != NULL) { |
|
Kevin Millikin (Google)
2017/08/14 06:20:50
free checks for null. It's clunky to check here,
jensj
2017/08/14 08:38:12
Done.
|
| + free(const_cast<uint8_t*>(kernel_data_)); |
| + kernel_data_ = NULL; |
| + } |
| + } |
| + |
| static Program* ReadFrom(Reader* reader); |
| NameIndex main_method() { return main_method_reference_; } |