Objective--C 一 关键字1 KVC 动态设值,动态取值,类似雨java中的反射,而且私有的照样可以设置与获取2 二 函数1 retain 给对象引用计数器 + 12 release 给对象引用计数器 - 13 dealloc 销毁对象,当对象引起计数器为O时,自动调用该方法,4 au.....
分类:
移动开发 时间:
2015-03-19 09:53:08
阅读次数:
170
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?这道...
分类:
其他好文 时间:
2015-03-18 23:06:39
阅读次数:
122
委托模式Tip委托对象不应该被retain实现委托模式的类应:拥有一个名为delegate_的实例变量来引用委托。因此,访问器方法应该命名为delegate和setDelegate:。delegate_对象不应该被retain。模型/视图/控制器(MVC)Tip分离模型与视图。分离控制器与视图、模型...
分类:
其他好文 时间:
2015-03-18 15:49:13
阅读次数:
154
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:
Can you solve it without using extra space?解题思路设链表长度为n,头结点与循环节点之间的长度为k。定义两个指针slow和fast,slow每次走...
分类:
其他好文 时间:
2015-03-18 14:07:38
阅读次数:
116
1》set方法内存管理的相关参数
retain
//release旧值,retain新值 (适用于OC对像类型)
assign
//直接赋值 (默认的参数,适用于非OC对象)
copy
//release旧值,copy新值
2》是否生成setter或者getter方法
readwrite
//同时生成setter和getter方法
readonly
//只生成gett...
分类:
其他好文 时间:
2015-03-18 14:04:48
阅读次数:
132
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull./** * Definition for singly-linked list. * class ListNod...
分类:
其他好文 时间:
2015-03-18 13:45:39
阅读次数:
107
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?runner 问题,注意while循环的条件。 1 /** 2 * Definit....
分类:
其他好文 时间:
2015-03-18 06:27:32
阅读次数:
114
------- android培训、java培训、期待与您交流! ----------内存管理之三——《@property的内存管理》1.@property中与setter内存管理相关的参数retain : release旧值,retain新值(适用于OC对象类型);assign : 直接赋值,(默...
分类:
其他好文 时间:
2015-03-18 01:11:13
阅读次数:
158
------- android培训、java培训、期待与您交流! ----------内存管理之二——《多对象的内存管理》1.多对象的内存管理方式:只要有人使用了这个对象,这个对象就不能被销毁;只要你想使用这个对象,就让这个对象的引用计数器的值+1(让对象做一次retain操作);当你不再使用这个对...
分类:
其他好文 时间:
2015-03-17 23:32:56
阅读次数:
211
Given a linked list, determine if it has a cycle in it.判断某个链表是否有环。方法一:用一个hashmap来存放访问过的节点,通过比较当前节点是否存在map中来判断是否有环:/** * Definition for singly-linked l...
分类:
其他好文 时间:
2015-03-17 21:45:57
阅读次数:
131