In the 3rd person traversal course we are creating new state every time we… well change state of a player in statemachine. So for example we are in FreeLookState, and we switch to TargetingState by creating a new TargetingState. Than we go back to new FreeLookState.
What happens to that “old” FreeLookState", that is now not used anywhere? (And to that TargetingState we just left.) Is it just cleaned by Garbage Collector? (I guess if this is true, answer to question how GC knows we are not using given instance anymore is a little too complicated and possibly goes too deep into C# itself. If it is so, omit this question.) Or am I missing some fundamental point here?