This depends on what State extends from. Usually you store all states in an array and then activate the current one instead of deleting and creating new ones
Oh, State extends from Node. I just trying to find the best way to use state machine for my game, and then i wonder if i should free() that object or godot do it for me.
Thanks for advices about array anyway.