General Category => Help and troubleshooting => Topic started by: conan on November 11, 2015, 07:16:37 pm
Is there a way to delete an instance from within onInstanceActionFinished() or anywhere that is called from it? The engine crashes if I try to do this because after the call it checks for "instance" (the parameter that was passed) and can't find it anymore.
Right now I'm putting the instance in a vector and I check the vector every pump() and free it. I don't think this is a very elegant way. Is there any other way?
I don't think there's another way. You should be careful in general with calling engine functions in onInstanceActionFinished(), safer to do it in pump().