Question about possible memory leak

Hello, everyone

I am studying tutorial sources at

I am doing under MS Windows 11 and Visual Studio 2022 and C++17

The executed program by this source opens a command prompt window (text terminal)
and that command prompt window opens a new Window where vulkan renders objects

If I kill the whole program by clicking the X button (closing window) on the most top right of the command prompt window, the whole program dies (terminates)
The problem is, then I cannot delete variables created by “new” in the source
Also, there are many dynamically allocated variables created by Vulkan itself
There is no WindowsProc which receives WM_CLOSE message
So I am worried about possible memory leaks

However, I found there is no memory leak even when I close the whole program by clicking that X button.
Anyway, still I don’t like this potential issue

My questions are

  1. There are many variables created by “new”
    May I not delete these when I terminate the whole program ?
    Does this not matter anyway?
    I am really curious why there is no leak

  2. Could you please help me find the real WIndowsProc which catches the final WM_CLOSE message in that source ?
    Actually, there is one windowProc in win32_windows.c at third_party/glfw/src folder
    But that windowProc does not receive the final WM_CLOSE

  3. If that is hard or impossible, I want to remove the command prompt window from the program
    I just want to start without command prompt window
    If so, should I remove “platform” objects from the source ? (Which looks difficult)

I will really appreciate if you can help me

Thank you and have a great weekend