[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: removing key from table
- From: Matthew Wild <mwild1@...>
- Date: Mon, 21 May 2012 15:10:25 +0100
On 21 May 2012 10:38, forume <forumme5487@live.com> wrote:
> Removed from virtual space and resource I meant of course. :-)
>
> If I had something like:
>
> t = {"string", "longdatastring", 10023841}
>
> Than "table.remove(t,2)" would really remove it so in virtual
> space/resources/memory I would really have:
>
> t = {"string", 10023841}
>
> Right? Or doesn't it even really do that?
>
In this example table.remove is internally doing *exactly* the same as:
t[2] = t[3]
t[3] = nil
Regards,
Matthew