2025-03-26 00:02:56 +08:00

7 lines
698 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ios
ARC在iOS开发中是指自动引用计数Automatic Reference Counting
ARC是苹果官方推出的帮助iOS开发工程师管理内存的一种自动内存管理机制它的前身是MRC即手动内存管理。ARC是新的LLVM3.0编译器的一项特性使用ARC后系统会检测出何时需要保持对象何时需要自动释放对象编译器会管理好对象的内存会在适当的地方插入retain、release和autorelease通过生成正确的代码去自动释放或者保持对象。
ARC并不是GC它只是一种代码静态分析工具。ARC的引入简化了开发过程中的内存管理使得内存管理更加高效和简便