Skip to content

ARC情况下有哪些限制 #8

@tbfungeek

Description

@tbfungeek
  • 不能使用retain/release/retainCount/autorelease
  • 不能使用NSAllocateObject/NSDeallocateObject
  • 不能显式调用dealloc
  • 不能使用NSZone
  • 对象型变量不能作为C语言结构体(struct、union)的成员(要把对象类型添加到结构体成员中,可以强制转换为void *或是附加__unsafe_unretained修饰符)
  • 须遵守内存管理的方法命名规则
  • 使用@autoreleasepool块替代NSAutoreleasePool

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