Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
578 views
in Technique[技术] by (71.8m points)

objective-c抛异常,导致内存泄露?

oc52方法,书中介绍:
理解 Objective-C 错误模型。很多语言都有异常处理机制,Objective-C也不例外。@throw。OC里抛异常很可能会导致内存泄漏。

因为thorw,会导致一些对象没有释放。但是这个APP就结束了。
虽然有些对象是野指针,但是这个APP不是已经没有了。

因此,是不是可以这样理解? 整个手机内存是一个整体,一个APP内存泄露,会导致整个手机的内存泄露,除非关机、重启可以解决?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...