Tencent / xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lua里getcomponent会残留一些引用在objectpool里,导致内存泄露是哪里有问题?

WuAlan opened this issue · comments

复现方法:
随便弄个gameobject对象,获取一下component
最后将lua里的对象都设为nil
示例代码:
self.ShoppingMallPage = self.ShoppingMallPageGameObject:GetComponent("ShoppingMallPageComponent")
self.ShoppingMallPage = nil
self = nil
collectgarbage()
最后objectpool里会残留
ShoppingMallPageComponent