Not really necessary because the deconstructor will run Close() anyway but doesn't hurt either since it's also executed a few lines further down. Maybe just remember the result of the GetScraperForPath() call, then execute m_musicDatabase.Close() and then do the actual if-condition and the early return to execute the same Close() independent of the result of the GetScraperForPath() call.