From dd2a84b980950c74128a2cec8f0c38c33b63041a Mon Sep 17 00:00:00 2001 From: Sandboxed API Team Date: Thu, 30 May 2019 23:50:31 -0700 Subject: [PATCH] Clarify behavior of Buffer::CreateFromFd PiperOrigin-RevId: 250834142 Change-Id: I7aac739c9b590adc0599926e3246bc87e21d951a --- sandboxed_api/sandbox2/buffer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sandboxed_api/sandbox2/buffer.h b/sandboxed_api/sandbox2/buffer.h index 8b7d5c5..90eeae6 100644 --- a/sandboxed_api/sandbox2/buffer.h +++ b/sandboxed_api/sandbox2/buffer.h @@ -35,6 +35,8 @@ class Buffer final { Buffer& operator=(const Buffer&) = delete; // Creates a new Buffer that is backed by the specified file descriptor. + // The Buffer takes ownership of the descriptor and will close it when + // destroyed. static ::sapi::StatusOr> CreateFromFd(int fd); // Creates a new Buffer of the specified size, backed by a temporary file that