To use ReleaseGUIObject, you first need to load GUIKit using Needs["GUIKit`"].
ReleaseGUIObject programmatically ends an interface's session (which is normally ended interactively by user actions such as closing the window), both closing and disposing of all related resources.
ReleaseGUIObject forces the termination of interface resources even if an initial GUIRun might have requested that the interface live on past its closing by using the option ReleaseMethod->Manual.
Use CloseGUIObject instead of ReleaseGUIObject to ensure the original lifecycle intent of a GUIRun call.