https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66339
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- OK, whatever weird definition of leak you are using is irrelevant. The memory is still in use until the program exits, and there is still a pointer to it. It is not lost, or forgotten about, it is in use by the run-time.