Replace releaseCallbackId with generateReleaseCallbackId in BufferData
releaseCallbackId was confusing data in BufferData because it wasn't being parceled, even though the rest of the object was. This is because the ReleaseCallbackId can be generated from info in BufferData. Therefore, remove releaseCallbackId and instead replace with a function that generates the ReleaseCallbackId This fixes an issue when Transactions that contained buffers for the same layer were being merged. The merge was expected to release the old buffer. However, if the Transaction was parceled before it was merged, the ReleaseCallbackId would be lost and the release callback would send an invalid callback id, resulting in a lost buffer that never got released. By using generateReleaseCallbackId, the callback id is recreated when the release callback needs to be invoked since the buffer and framenumber are already being parceled. Test: ReleaseBufferCallbackTest Test: AppConfigurationTests Bug: 209920544 Change-Id: I2a24b8a9764959173c960048dc82e68f4c083898
Loading
Please register or sign in to comment