MacOS onlyThen you close your window with right click on application in doc - Quit, there is no event sf::Event::Closed generated, so you can't correctly save your game, and release resources.
Solution is to set application delegete, and override
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
to return NSTerminateCancel and add close event to queue.
Discuss.