drain:
- <span style="font-size:18px;">In a reference-counted environment, releases and pops the receiver; in a garbage-collected environment, triggers garbage collection if the memory allocated since the last collection is greater than the current threshold.</span>
release
- <span style="font-size:18px;">Decrements the receiver’s reference count. (required)</span>
本文详细解释了Objective-C中release和drain的概念,包括它们在引用计数和垃圾收集环境中的行为,以及如何正确使用它们来管理内存。
1710

被折叠的 条评论
为什么被折叠?



