使用keyObj 生成 weak_key 作为 map 里存储的key, 这样 keyObj对象可以随时被回收; 但是这样的话,key 对应的value 还在 map 中,所以value 不能自由回收; 所以weak_key 关联 ReferenceQueue, 这样 keyObj...
分类:
其他好文 时间:
2015-10-29 20:21:32
阅读次数:
262
首先回顾一下 ?java 的几种 reference: 从jdk 1.2 开始,引用分为 强引用,软引用、若引用 和虚引用, 其中?软引用、若引用 和虚引用 和 ReferenceQueue 关联。 在JDK 1.2以前的版本中,若一个对象不被任何变量...
分类:
移动开发 时间:
2015-10-29 18:35:13
阅读次数:
528
Member reference type 'struct objc_class *' is a pointer; maybe you meant to use '->'?Definition of 'struct objc_class' must be imported from module '...
分类:
移动开发 时间:
2015-10-29 18:14:56
阅读次数:
420
现在的项目是手动内存管理,所以在引入第三方资源库时候,很多资源库更新以后都开始使用arc进行编码,这样就导致两种代码风格不一致,有的时候可能开发者也没有注意到这些问题,反正用的时候也没有报错,就直接使用了;但是有的时候,因为arc编码中用到了新的属性修饰符,例如weak,这时候在手动管理内存的代码....
分类:
移动开发 时间:
2015-10-29 12:57:21
阅读次数:
230
import UIKit class ViewController: UIViewController { @IBOutlet weak var toolBar: UIToolbar! @IBOutlet weak var addActionLabel: UILabel! override ...
分类:
编程语言 时间:
2015-10-28 21:13:50
阅读次数:
312
在less中,通过@import (keyword) "filename"的方式引入其他的文件,这个keyword可以是以下6种:referrencereferrence这个keyword,例如: @import (reference) "file.less"将使得file.less文件中定义的所有...
分类:
其他好文 时间:
2015-10-28 12:22:51
阅读次数:
216
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢!我们之前一直在使用“对象”这个概念,但没有探讨对象在内存中的具体存储方式。这方面的讨论将引出“对象引用”(object reference)这一重要概念。对象引用我们沿用之前定义的Hu...
分类:
编程语言 时间:
2015-10-27 23:26:47
阅读次数:
223
reference to : http://www.infoq.com/cn/articles/android-accessibility-installing?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=...
分类:
移动开发 时间:
2015-10-27 21:50:56
阅读次数:
321
#import "ViewController.h"#import "Person.h"#import "Student.h"@interface ViewController (){ NSString *_text;}@property (weak, nonatomic) IBOutlet ...
分类:
移动开发 时间:
2015-10-27 15:15:22
阅读次数:
188
reference : http://blog.chinaunix.net/uid-20732478-id-763411.html使用了VIM这么久,却一直无法牢记一些基本的操作指令。今天查找一个关键字时,想不起来怎么查找“下一个”,于是google之并解决,顺便把有用的都贴过来罢。查找指令:/xx...
分类:
系统相关 时间:
2015-10-27 13:10:47
阅读次数:
158