Properly destroying gui contexts.