Search found 1 match

by chicohaze
Wed Dec 08, 2021 2:05 am
Forum: General
Topic: Does table.remove remove the item from memory?
Replies: 2
Views: 3518

Does table.remove remove the item from memory?

Hi,

I'm new to LÖVE and new to Lua. I have a question about table.remove.

Say I'm tracking a bunch of enemies in a table and I want to destroy one. When I do table.remove(enemies, i), does it destroy that the enemy object and remove it from memory, or does it just remove it from the enemies table?