Is there an acceptable limit for memory leaks?

前端 未结 11 2260
無奈伤痛
無奈伤痛 2021-02-02 12:08

I\'ve just started experimenting with SDL in C++, and I thought checking for memory leaks regularly may be a good habit to form early on.

With this in mind, I\'ve been

11条回答
  •  面向向阳花
    2021-02-02 12:22

    Firstable memory leaks are only a serious problem when they grow with time, otherwise the app just looks a little bigger from the outside (obviously there's a limit here too, hence the 'serious'). When you have a leak that grows with time you might be in trouble. How much trouble depends on the circumstances though. If you know where the memory is going and can make sure that you'll always have enough memory to run the program and everything else on that machine you are still somewhat fine. If you don't know where the memory is going however, i wouldn't ship the program and keep digging.

提交回复
热议问题