原创 OC之構造方法

完整地創建一個可用的對象系統需要進行以下兩步: 1.分配存儲空間 +alloc 2.初始化 -init 比如創建一個對象: Person *p = [Person new]; 則系統實際上進行了以下兩步:     1.調用+alloc分