Add a comment about takeOwnership()
Summary: It is dangerous to pass memory into an IOBuf since usually in C++ programs, memory is allocated using `new`, while IOBuf by default frees memory that it has taken ownership of with `free()`. For now, add a comment warning about this (address sanitizer will warn you about this when it happens in a live process). Test Plan: NA Reviewed By: tudorb@fb.com FB internal diff: D990056 @override-unit-failures
Showing
Please register or sign in to comment