🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How does lua __gc metamethod works ?

Started by
0 comments, last by Shnoutz 20 years, 2 months ago
I do something like this : function disp() print (''__gc called'') end test = {} test_mt = {__gc = disp} so when is destroyed should be called ? Is there something wrong because is never called ?
Advertisement
__gc only works on userdata, not tables.

This topic is closed to new replies.

Advertisement