Commit afce0f0b authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Replace new/delete[] with std::unique_ptr

Summary: Replace new/delete[] with std::unique_ptr

Reviewed By: yfeldblum

Differential Revision: D13525009

fbshipit-source-id: 8497329e2881f1cfd6fe7ca5c4ae432c3071faec
parent 1fbec4b0
...@@ -1041,9 +1041,8 @@ void AsyncSocket::writeChain( ...@@ -1041,9 +1041,8 @@ void AsyncSocket::writeChain(
writeChainImpl(callback, vec, count, std::move(buf), flags); writeChainImpl(callback, vec, count, std::move(buf), flags);
} else { } else {
iovec* vec = new iovec[count]; std::unique_ptr<iovec[]> vec(new iovec[count]);
writeChainImpl(callback, vec, count, std::move(buf), flags); writeChainImpl(callback, vec.get(), count, std::move(buf), flags);
delete[] vec;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment