From 0edb0018ffd206424354de5141576979263d48e4 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 20 Jul 2017 12:58:45 +0900 Subject: [PATCH] Dispose of heap when we reset the context. --- lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb | 1 + lib/js_locale_helper.rb | 1 + lib/pretty_text.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb index 0814a968be5..9ca2c8f2f45 100644 --- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb +++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb @@ -41,6 +41,7 @@ JS end def self.reset_context + @ctx.dispose @ctx = nil end diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb index 44a2fe537ea..fe9f1951923 100644 --- a/lib/js_locale_helper.rb +++ b/lib/js_locale_helper.rb @@ -161,6 +161,7 @@ module JsLocaleHelper end def self.reset_context + @ctx.dispose @ctx = nil end diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb index fd1e73c68a7..40d000368fa 100644 --- a/lib/pretty_text.rb +++ b/lib/pretty_text.rb @@ -123,6 +123,7 @@ module PrettyText def self.reset_context @ctx_init.synchronize do + @ctx.dispose @ctx = nil end end