Skip to content

自动释放池的作用是什么 #22

@tbfungeek

Description

@tbfungeek

主要用在如下情形下:

  1. 函数返回值在被持有之前的暂时管理
  2. 通过类方法创建对象的时候
  3. 使用如下的便捷语法来建立对象的时候
NSArray *array = @[@"abc",@"def"];
NSNumber *number = @123;
  1. 在某些需要大量创建临时大内存对象的时候通过使用局部释放池来提前释放这些对象,来避免出现内存峰值出现。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions