Merge "SharedBuffer: Refactor release() logic"