[libcxx-commits] [libcxx] [libc++] Destroy elements when exceptions are thrown in __construct_at_end (PR #167112)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 19 13:58:18 PDT 2026
ldionne wrote:
@philnik777 @frederick-vs-ja Please take a look, I added some tests and hopefully this PR should be good to go.
It's interesting to note that even prior to this patch, we were not technically leaking anything when an exception is thrown since we'd destroy the elements in the vector destructor itself. However now we do so in the operation itself that failed, which seems better. Also I think this allows us to remove `_ConstructTransaction`, which TBH is good in itself.
https://github.com/llvm/llvm-project/pull/167112
More information about the libcxx-commits
mailing list