Basically I appended an object to a list every time it is created, and I have a loop that goes over this list and I want it to call the object's delete function as well as remove it from the list if this object fulfills some conditions.
I have tried adding this function into the object but calling it doesn't seem to change the length of the list.
this.pop = function()
{
delete(this);
}