何时self.student = [[Student alloc] init];  //student 对象 retainCount = 2;容易造成内存泄露
由于objective-c内存管理是根据引用计数处理的,当一个对象的引用计数为零时,gcc才会释放该内存。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2021-08-09
  • 2021-12-17
  • 2021-07-05
相关资源
相似解决方案