本篇态度: simple & stupidweak reference
Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed. Weak references are most often used to imp...
分类:
编程语言 时间:
2015-05-06 09:19:03
阅读次数:
188
本篇宗旨:simple & stupidWeakHashMap (弱引用的哈希表)
Hash table based implementation of the Map interface, with weak keys. An entry in a WeakHashMap will automatically be removed when its key is no longer in or...
分类:
编程语言 时间:
2015-05-06 09:18:34
阅读次数:
141
iOS 5 中对属性的设置新增了strong 和weak关键字来修饰属性(iOS 5 之前不支持ARC)strong 用来修饰强引用的属性;@property (strong) SomeClass * aObject;对应原来的@property (retain) SomeClass * aObje...
分类:
移动开发 时间:
2015-05-05 21:39:45
阅读次数:
163
??
shared_ptr是一个引用计数智能指针,用于共享对象的所有权。它可以从一个裸指针、另一个shared_ptr、一个auto_ptr、或者一个weak_ptr构造。还可以传递第二个参数给shared_ptr的构造函数,它被称为删除器(deleter)。删除器用于处理共享资源的释放,这对于管理那些不是用new分配也不是用delete释放的资源时非常有用。shared_ptr被创建后,就可以...
分类:
编程语言 时间:
2015-05-05 12:35:00
阅读次数:
179
API Reference对__block变量修饰符有如下几处解释://A powerful feature of blocks is that they can modify variables in the same lexical scope. You signal that a block can modify a variable using the __block storage typ...
分类:
其他好文 时间:
2015-05-04 12:07:38
阅读次数:
135
一、实现效果实现图片的自动轮播 二、实现代码storyboard中布局代码: 1 #import "YYViewController.h" 2 3 @interface YYViewController () 4 @property (weak, nonatomic) IBOutl...
分类:
移动开发 时间:
2015-05-03 18:44:08
阅读次数:
140
WeakMemoryCache 源码:
BaseMemoryCache参见:http://blog.csdn.net/woliuyunyicai/article/details/45330867
/**
* Memory cache with {@linkplain WeakReference weak references} to {@linkplain android.graphic...
分类:
移动开发 时间:
2015-05-03 12:05:32
阅读次数:
230
强引用和弱引用: 我们已经知道OC中的内存管理是通过“引用计数器”来实现的。一个对象的生命周期取决于它是否还被其他对象引用(是否retainCount=0)。但在有些情况下,我们并不希望对象的销毁时间由是否被其他对象引用来决定,而是这个对象本该是什么时候销毁就什么时候被销毁。这时,我们得引入“强引....
分类:
移动开发 时间:
2015-05-02 15:02:08
阅读次数:
168
实现原理:1.通过UIWebView的stringByEvaluatingJavaScriptFromString方法来触发脚本2.通过自定义连接来触发oc代码实现过程@IBOutlet weak var webView: UIWebView! override func viewDidLoa...
分类:
编程语言 时间:
2015-05-01 14:39:43
阅读次数:
205
@property解释及其相关参数说明
参数:retain assign copy strong weak unsafe_unretained autoreleasing readwrite readonly nonatomic atomic setter getter...
分类:
其他好文 时间:
2015-05-01 13:26:29
阅读次数:
1031