15445-bootcamp icon indicating copy to clipboard operation
15445-bootcamp copied to clipboard

Remove redundant null check before delete in wrapper_class

Open tbobo opened this issue 1 year ago • 0 comments

As it turns out, the C++ standard guarantees that a delete against a null pointer is a no-op. From https://en.cppreference.com/w/cpp/memory/new/operator_delete:

In all cases, if ptr is a null pointer, the standard library deallocation functions do nothing.

tbobo avatar Feb 15 '24 13:02 tbobo