bennyxqg / lua-alchemy

Automatically exported from code.google.com/p/lua-alchemy
0 stars 0 forks source link

as3.toobject causes memory leak #165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
lua.doString("return as3.toobject({a=1,b=2,c=3,d='he began to feel the danger 
of paying Elizabeth too much attention'})");

If you use a weak Dictionary to catch the object returned by lua, you can see 
those objects are not eligible for garbage collection.

We have a lot of as3.toarray and as3.toobject calls, and we have replaced those 
as3.toarray with json.encode in lua and JSON.parse in as3 for some other 
reason. So one workaround for us would be use the same technique as we did for 
as3.toarray, or do you have other suggestions?

Original issue reported on code.google.com by DanrenJ...@gmail.com on 31 Aug 2013 at 3:59