码迷,mamicode.com
首页 >  
搜索关键字:retain cycle    ( 2217个结果
简单的实现UIpicker上面的取消确定按钮
1 因为我用的xib实现的添加picker 和textfiled的,@interfaceViewController:UIViewController{UIToolbar*tool;//主要用这存放按钮}@property(retain,nonatomic)IBOutletUIDatePicker*...
分类:其他好文   时间:2014-11-26 20:30:43    阅读次数:242
LeetCode[Linked List]: 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? 这个题目如果没有空间复杂度O(1)的限制,我可以想到的方法就是:遍历整个list,将每个节点的地址存入一个vector,如果发现某个节点的next的地址已经在vec...
分类:其他好文   时间:2014-11-26 19:02:15    阅读次数:119
LeetCode[Linked List]: Linked List Cycle II
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? 这个题目跟Linked List Cycle一样,我也没有能够自己独立找到解决方法,...
分类:其他好文   时间:2014-11-26 18:57:10    阅读次数:126
Nginx源码分析—架构设计思想
Nginx源码分析—架构设计思想 我任务nginx的源码可以分为三个部分,一个是在ngx_init_cycle之前,这个也算是为了重新启动nginx而准备的代码,比如说在这个时候可以接受外部的信号,也可以保存传递的参数,等等,当然在以后的函数中也考虑了是否正在重启nginx。          至于ngx_init_cycle这个函数,是一个很庞大的函数,在这个函数中可以看到调用了各个模块的钩...
分类:其他好文   时间:2014-11-26 16:37:00    阅读次数:164
谈谈OC的内存管理 (2013-01-08 09:28:14)
苹果的内存有限,为了更好的用户体验,需要手动管理内存。从网上copy,也一 基本原理Objective-C的内存管理机制与Java那种全自动的垃圾回收机制是不同的,它本质上还是C语言中的手动管理方式,只不过稍加了一些自动方法.1,OC采用了引用计数(retain count)对对象内存进行管理,例如...
分类:其他好文   时间:2014-11-26 14:10:55    阅读次数:165
【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?...
分类:其他好文   时间:2014-11-26 01:31:06    阅读次数:160
Objective-c内存管理
cocoa中的内存管理机制 引用计数每一个对象都拥有一个引用计数当对象创建的时候,引用计数的值是1当发生retain消息时,该对象的引用计数+1,该对象的引用计数为2当向这个对象发送release消息时,该对象的引用计数减1当一个对象的应用计数为0时,系统自动调用dealloc方法,销毁该对象。 ....
分类:其他好文   时间:2014-11-25 23:24:09    阅读次数:134
内存管理-黄金法则
1、内存管理-黄金法则The basic rule to apply is everything that increases the reference counter with alloc, [mutable]copy[withZone:] or retain is in charge of t...
分类:其他好文   时间:2014-11-25 20:31:26    阅读次数:288
Leetcode: 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 space?分析:...
分类:其他好文   时间:2014-11-25 16:24:51    阅读次数:177
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?分析:如果一个linked list中有环,那么在用一个快指针和一个慢指针遍历该li...
分类:其他好文   时间:2014-11-25 16:09:31    阅读次数:194
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!