ruby-pinyin icon indicating copy to clipboard operation
ruby-pinyin copied to clipboard

切换 override_files, 会出现严重的内存泄露问题

Open LcpMarvel opened this issue 9 years ago • 1 comments

安装下辅助gem,get_process_mem

  def test_memory_leak_on_override_files
    loop do
      puts GetProcessMem.new.mb

      PinYin.override_files = [File.expand_path('../fixtures/my.dat', __FILE__)]
      PinYin.romanize('广', :ascii)
      PinYin.override_files = []
    end
  end

LcpMarvel avatar Feb 25 '16 09:02 LcpMarvel

https://github.com/janx/ruby-pinyin/blob/master/lib%2Fruby-pinyin%2Fbackend%2Fmmseg.rb#L13

LcpMarvel avatar Feb 25 '16 09:02 LcpMarvel