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
Loading
Please sign in to comment