Skip to content

Fix memory leak due to recent port to std::unique_ptr

David Faure requested to merge work/dfaure/fix_memory_leak into master

commit 8eec3450 replaced delete d_ptr with a std::unique_ptr, but there's a catch in this class hierarchy, as indicated by the comment about BasePrivate: its destructor isn't virtual (on purpose) so one needs to delete a pointer with the right derived type.

Detected by ASAN on bin/utiltest (and probably all others)

Merge request reports