Jump to content

Question


'LinKin

Recommended Posts

Hello,

I've a table.

myTable = {}

And I add it things like this

myTable[1][1] = somePlayerNick

myTable[1][2] = thePlayerElement

.. Many rows

Then, to clear it I'm doing this:

for k, v in pairs (table_RealNames) do

table_RealNames[k][v] = nil

end

BUT. It's messing it up! So then I did this to clear it: myTable = {}

Someone told me once that way was good too, but, is the the BEST way? That person told me that LUA's garbage collector would clear the old table's position in memory in the next cycle. But hm, are you very sure?

I just want to make things as they must be. The best way

Thanks

Link to comment
  • Moderators
Someone told me once that way was good too, but, is the the BEST way? That person told me that LUA's garbage collector would clear the old table's position in memory in the next cycle. But hm, are you very sure?

That person is totally right, why don't you just listen to him ? he looks like a good programmer.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...