What is the best way to check for a removed object? I have been pretty careful and my method works pretty well most of the time. Linearly, my method works 10 times out of 10, but sometime if a lot is going on, the object would pass my test in one function, get deleted by another function, and then try to be deleted in the original function. This throws massive errors in corona and has me thinking of crazy what if cases that start to bloat my code.
Here’s my method:
[lua]if obj then
if obj.x then
obj:removeSelf()
end
end[/lua]
What’s yours? [import]uid: 54716 topic_id: 19475 reply_id: 319475[/import]