码迷,mamicode.com
首页 >  
搜索关键字:retain cycle    ( 2217个结果
[Leetcode] Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Solution:快慢指针。 1 /** 2 * Definition for s....
分类:其他好文   时间:2014-10-17 15:16:48    阅读次数:179
黑马程序员---ios开发之,property指针在ios5中的一些说明
在iOS开发过程中,属性的定义往往与retain, assign, copy有关,我想大家都很熟悉了,在此我也不介绍,网上有很多相关文章。现在我们看看iOS5中新的关键字strong, weak, unsafe_unretained. 可以与以前的关键字对应学习strong与retain类似,wea...
分类:移动开发   时间:2014-10-17 13:20:00    阅读次数:183
为数据表对象(NSManagedObject)添加排序
eg:数据库表对象 @interface Meditation : NSManagedObject @property (nonatomic, retain) NSString * order;//用来排序的属性值,用0、1、2、3...排序 @end //在这个方法里操作 - (void)tableView:(UITableView *)tableView ...
分类:编程语言   时间:2014-10-15 18:22:01    阅读次数:113
@properties指针说明
在iOS开发过程中,属性的定义往往与retain, assign, copy有关,我想大家都很熟悉了,在此我也不介绍,网上有很多相关文章。 现在我们看看iOS5中新的关键字strong, weak, unsafe_unretained. 可以与以前的关键字对应学习strong与retain类似,we...
分类:其他好文   时间:2014-10-15 15:24:03    阅读次数:179
Linked List Cycle II
题目描述:Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra spac...
分类:其他好文   时间:2014-10-15 11:10:10    阅读次数:219
Linked List Cycle
题目描述:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?解题方案:使用快慢指针,如果有环,快指针肯定会追上慢指针。下面是该题的代码...
分类:其他好文   时间:2014-10-15 00:03:19    阅读次数:183
【LeetCode】【C++】Linked list cycle 2
面试经常问的一道算法题!...
分类:编程语言   时间:2014-10-14 22:05:49    阅读次数:188
ARC中strong、weak、unsafe_unretained的区别
第一、strong关键字与retain关似,用了它,引用计数自动+1 如果person定义如下: @interface Person : NSObject @property(nonatomic,strong)Book *book1; @end @autoreleasepool { p1=[[Person alloc] init]; Book *book...
分类:其他好文   时间:2014-10-14 19:57:39    阅读次数:207
COCOS2D-X中的智能指针
Cocos2d-x中所有内存管理方式的基础是引用计数,动态分配一个Ref对象后其引用计数为1,并通过retain和release来增持和减少其引用计数。引用计数本身并不能帮助我们进行内存管理。 为了正确地释放对象的内存,Cocos2d-x使用Objective-C里面的自动回收池的机制来管理对象内存的释放。Autorelease有点类似于一个共享的”智能指针”,该”智能指针”的作用域为一...
分类:其他好文   时间:2014-10-13 18:50:09    阅读次数:251
在block函数中规避错误信息 "capturing self strongly in this block is likely to lead to a retain cycle”
以形如 _fontValueChangedBlock = ^(){ [self.fontSmallButton addTarget:self action:@selector(btnFontSmallClicked) forControlEvents:UIContr...
分类:其他好文   时间:2014-10-13 16:12:29    阅读次数:170
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!