Commit 8c724313 authored by Fan Xu's avatar Fan Xu
Browse files

Add close function to IBufferClient

In ag/5536079 we found that simply destroy sp<> is actually doing an
async memory deallocation and could result in race condition in the same
process. Therefore, we add a close() function for users to explicitly
close the client and remove unused tokens, also a CLIENT_CLOSED error to
indicate that the close() function is already executed.

Note that user still need to destroy the sp<> to actually free the
memory.

Test: BufferHubBuffer_test (passed)
Bug: 119623209
Change-Id: I05f7be38bf612c1b05be51c4040962d7c504eaee
parent a1cbc8c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment