zoukankan      html  css  js  c++  java
  • iOS.-.cxx_destruct

    .cxx_destruct

    -.cxx_destruct 方法: 该方法是由编译器生成的方法。

    1. “ARC actually creates a -.cxx_destruct method to handle freeing instance variables. This method was originally created for calling C++ destructors automatically when an object was destroyed. The visible difference of this with ARC is that Objective-C instance variables are now deallocated after -dealloc in the root class has finished, not before. In most cases, this should make no difference.” R[1]

    2. R[2] 链接中的内容充分说明了: "-.cxx_destruct" 是在其父类(这里可能有出入)的dealloc被调用后才被调用的。


    Reference

    1.  Objective-C Phrase Book, Second Edition [To Read]

    http://my.safaribooksonline.com/book/programming/objective-c/9780132908641/3dot-memory-management/ch03

    http://www.informit.com/articles/article.aspx?p=1806938&seqNum=12

    2. Effective Objective-C 2.0: 52 Specific Ways to Improve Your iOS and OS X 

    Item 30: Use ARC to Make Reference Counting 

    http://books.google.com.hk/books?id=qp4ZXAmGaoQC&pg=PT185&lpg=PT185&dq=iOS+.cxx_destruct+crash&source=bl&ots=tYmMdkMg2t&sig=Jk4L0lHPTy8nPVfIEPUmkR7zNrE&hl=en&sa=X&ei=ZTJuUt3TA8SOkwXXvYDACQ&ved=0CGgQ6AEwCQ#v=onepage&q=.cxx_destruct&f=false

    3. http://sweettolife.com/questions/12562058/arc-converted-app-crashing-with-last-call-to-cxx-destruct

    ---
  • 相关阅读:
    SQL 去重 DISTINCT 语法
    urllib2 urllib urllib3的区别联系
    urllib库中常见的类和方法
    python模块之json pickle
    python os模块
    python的常见内置模块之-----time
    列表,队列,栈,链表的内存模型
    open函数
    session和cookie
    随笔小skill
  • 原文地址:https://www.cnblogs.com/cwgk/p/3419797.html
Copyright © 2011-2022 走看看