Do memory leaks understand leaks when an application is running, or can memory not be freed even after the program is terminated? As far as I understand, when the program is completed, the OS frees up all the memory it occupies. If so, what are the ways of memory clogging after the program ends?

  • 2
    By the way, besides memory, other entities can also flow away (handles, GDI objects, etc.) - Kromster

1 answer 1

Usually, the entire kernel is managed by the OS kernel (perhaps there are some "fenced" solutions with fast DMA ... but there will probably be a completely different situation) and if he has everything with memory management, then it will take it back after work program and give it to another software.

Those. Yes, "by memory leaks understand leaks when an application is running."

  • Will the memory be automatically freed when using such mechanisms as allocating memory in the address space of another process or when allocating memory for files projected into memory? - DarkGenius
  • one
    I assume that this will depend on the implementation of these mechanisms in the OS. I can’t say more, because never dug so deep. - deterok