Oops. Found the cause of a leak I was seeing regularly. std::unique_ptr::release...

@charette@mstdn.ca

Oops. Found the cause of a leak I was seeing regularly.

std::unique_ptr::release() does not delete the pointer. It simply releases it, and the caller is then responsible for managing the original pointer.

std::unique_ptr::reset() is what deletes the pointer.

#cpp