Remove SurfaceManager creation in ::instance()
If a SurfaceManager is created here, there's no way it can get
destroyed by going out of scope. That would be a huge,
difficult-to-diagnose problem.
commitdbb33c85ca9f3c09336e51273fb14267a1bad990
authorDalton Durst <dalton@ubports.com>
dateThu 28 Jan 2021, 20:49 (6 years ago)
parent977d1d7
tests/mocks/Unity/Application/SurfaceManager.cpp−3
@@ -35,9 +35,6 @@ SurfaceManager *SurfaceManager::m_instance = nullptr;
3535
3636SurfaceManager *SurfaceManager::instance()
3737{
38− if (m_instance == nullptr) {
39− auto inst = new SurfaceManager();
40− }
4138 return m_instance;
4239}
4340