Skip to content

table map memery leak  #214

@zgame

Description

@zgame
  1. What version of GopherLua are you using? : newest
  2. What version of Go are you using? : 1.10
  3. What operating system and processor architecture are you using? : windows
  4. What did you do? : game
  5. What did you expect to see? :
  6. What did you see instead? :

gopher-lua table map memery leak

GlobalMap= {}
  -- create Global Map hash
        for i=1,500000 do
            GlobalMap[tostring(i)] = i
        end
        
        -- clear  Global Map hash element
        for i,_ in pairs(GlobalMap)do
            GlobalMap[tostring(i)] = nil        -- memery leak
        end
        
        -- if you clear all data, it's ok, but,  if you clear some data,  memery leak
        --GlobalMap = {}
        --collectgarbage()

I use map hash , element = nil some memery can't clear , how to do this ? thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions