Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2eb71ebc authored by Lloyd Pique's avatar Lloyd Pique
Browse files

SF: Fix a scheduler related mock leak

After a recent change to inject mocks for use in the scheduler, it turns
out the mocks were being leaked, and the test was complaining about
such. However `atest libsurfaceflinger_unittest` hides those messages.

If you run the test directly, it complains "ERROR: 276 leaked mock
objects found at program exit." with a bunch more information about
which ones, and which tests were the source.

Its a one line change to fix the leak in all tests. This patch does so.

Test: libsurfaceflinger_unittest
Bug: None
Change-Id: Ifb4969c16dcf17a7c55777a3a3e3896273cab68f
parent 70954fd0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -368,6 +368,7 @@ public:
        mutableDrawingState().displays.clear();
        mutableEventQueue().reset();
        mutableInterceptor().reset();
        mFlinger->mScheduler.reset();
        mFlinger->mCompositionEngine->setHwComposer(std::unique_ptr<HWComposer>());
        mFlinger->mCompositionEngine->setRenderEngine(
                std::unique_ptr<renderengine::RenderEngine>());