摘要: OC内存分析之retain与copy的简单测试示例 1、初始化Circle类的origin时可以采用以下方式: (1)origin = [[XYPoint alloc] initWithX:_p.x andY:_p.y]; (2)origin = [_p retain]; 或 origin = [_ 阅读全文
posted @ 2016-03-18 16:19 待我俊临天下再来寻你 阅读(151) 评论(0) 推荐(0) 编辑
摘要: OC类的使用,属性声明与复合类的实现示例 /*********XYPoint.h***********/ #import <Foundation/Foundation.h> @interface XYPoint : NSObject{ int x; int y; } @property(nonato 阅读全文
posted @ 2016-03-18 16:18 待我俊临天下再来寻你 阅读(158) 评论(1) 推荐(0) 编辑