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

Commit fbc56269 authored by Vova Sharaienko's avatar Vova Sharaienko Committed by Automerger Merge Worker
Browse files

Merge "Fixed gpuservice_unittest mem leaks" am: 8de18018 am: 86a3e60c am:...

Merge "Fixed gpuservice_unittest mem leaks" am: 8de18018 am: 86a3e60c am: 403e26a6 am: 7f3b2468 am: 52234bfe

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2143292



Change-Id: I428d3367bca25d34d4ae2b5d4ec3d2ca727a2dc8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 91bad76a 52234bfe
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);