General Category > Help and troubleshooting

Deleting an instance from onInstanceActionFinished()

(1/1)

conan:
Hi,

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?

Thanks!

Niektory:
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().

Navigation

[0] Message Index

Go to full version