memory leaks when program is closed with x

前端 未结 3 905
时光取名叫无心
时光取名叫无心 2021-01-25 05:57

Might be a stupid question, but if I create a console-application that dynamicly creates object and such, I make sure to free the memmory at shutdown. What happens if a user clo

3条回答
  •  醉话见心
    2021-01-25 06:53

    Unless you have an embedded (or buggy) O/S you don't need to do anything.

    If you do have an embedded (or buggy) O/S, you need to rigorously keep track of all your memory allocations and ensure there's a corresponding free. For a buggy O/S, you should additionally complain to the provider of said O/S

提交回复
热议问题