PlayerInfo is not leaked, the destructor of its locale static instance is called as one of the last actions before the Mixxx process dies. But anyway, your idea is fine, it will make the code more clean. I will fix it.