Is Object Releasing on Program Exit Really Needed?

后端 未结 4 465
天命终不由人
天命终不由人 2020-12-31 06:45

Is releasing objects on a programs exit/close needed?

In other words, let us say for the sake of argument, you have a button that closes your application, but right

4条回答
  •  孤城傲影
    2020-12-31 06:45

    Releasing can help you find bugs. More often than not dynamic memory problems trigger at release time (e.g., you attempt to release an invalid object). Always releasing can help you identify bugs that would otherwise be hard to find.

提交回复
热议问题