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

Commit 8de18018 authored by Vova Sharaienko's avatar Vova Sharaienko Committed by Gerrit Code Review
Browse files

Merge "Fixed gpuservice_unittest mem leaks"

parents d69bd1e5 8a7e7fc2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -76,6 +76,12 @@ public:
                ::testing::UnitTest::GetInstance()->current_test_info();
        ALOGD("**** Tearing down after %s.%s\n", test_info->test_case_name(), test_info->name());

        // This is required for test due to GpuStats instance spawns binder transactions
        // in its destructor. After the gtest destructor test exits immidiatelly.
        // It results in binder thread not able to process above binder transactions and memory leak
        // occures. Binder thread needs time to process callbacks transactions.
        // It leads to GpuStats instance destructor needs to be called in advance.
        mGpuStats.reset(nullptr);
        // performs all pending callbacks until all data has been consumed
        // gives time to process binder transactions by thread pool
        looper->pollAll(1000);