In something like this you don't need pointers with class types, so you can safely delete PState type. You can do
It copies a reference to the MainMenuState object, not any actual data. Class variable is actually almost like pointer.Code:CurrentState:=MainMenuState;
Bookmarks