Any way deleting item from a table when only var containing it is known?
Posted: Wed Mar 05, 2025 2:17 pm
I am rewriting my code to work faster, and right now I am in bit of a problem.
Situation is that I have this table containing items, and I am in need of deleting a specific one of them out.
However, problem is that I don't have access to the table at that point, but only to the item.
As in situation is:
Is there any way I can either delete this ItemVar from MyTable in this SomeFunc() situation?, or way to find out in what index ItemVar resides in MyTable?
edit:
Comes to my mind that ItemVar is pointing to some certain memory address, as far as I have understood. Therefore, is there any command to make that target memory address NIL? would something like that work?
Situation is that I have this table containing items, and I am in need of deleting a specific one of them out.
However, problem is that I don't have access to the table at that point, but only to the item.
As in situation is:
Code: Select all
Function MyVar(Item)
Delete Item from Mytable?
EndFunction
mytable = {}
ItemVar = Mytable[n]
somefunc(ItemVar)edit:
Comes to my mind that ItemVar is pointing to some certain memory address, as far as I have understood. Therefore, is there any command to make that target memory address NIL? would something like that work?