Is there an acceptable limit for memory leaks?

前端 未结 11 2223
無奈伤痛
無奈伤痛 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:40

    Living with memory leaks (and other careless issues) is, at its best, (in my opinion) very bad programming. At its worst it makes software unusable.

    You should avoid introducing them in the first place and run the tools you and others have mentioned to try to detect them.

    Avoid sloppy programming - there are enough bad programmers out there already - the world doesn't need another one.

    EDIT

    I agree - many tools can provide false positives.

提交回复
热议问题