Here is a quick summary: A strong reference will keep the object it points to from being deallocated. Aweak reference will not. Thus instance variable...
分类:
其他好文 时间:
2014-11-05 18:58:44
阅读次数:
137
单击一个已有的按钮后自动创建一个新的按钮,并为新按钮添加事件,使得单击时弹出提示框。
在viewcontroller.h中添加
@property (weak,
nonatomic) IBOutlet
UIButton *addbutton;
为这个按钮添加响应事件addbutton
在viewcontroller.m中添加
- (IBAction)ad...
分类:
移动开发 时间:
2014-11-05 14:55:04
阅读次数:
397
【ARC的特性】 ARC下,所有NSObject类型指针, 1. 默认为__strong类型 2. 可以显示的指定为__weak类型,__weak类型指针在所指向对象销毁后会自动置为nil 3. __autorelesing类型用于inout参数类型 ARC下,当一个函数返回一个NSObj...
分类:
移动开发 时间:
2014-11-05 14:19:29
阅读次数:
286
一、什么是 ARC ?所谓ARC就是Automatic Reference Counting , 即自动引用计数。ARC是自iOS5引入的。ARC机制的引入是为了简化开发过程的内存管理的。相对于之前的MRC (Manual Reference Counting) , ARC机制显得更加自动化。在使用...
分类:
移动开发 时间:
2014-11-05 01:54:51
阅读次数:
226
下面是实验室大牛师兄自己写的一段总结,主要内容是Laplacian Eigenmap中的核心推导过程。有空还是多点向这位师兄请教,每次都会捡到不少金子。Reference : 《Laplacian Eigenmaps for Dimensionality Reduction and Data Rep...
分类:
其他好文 时间:
2014-11-05 01:51:32
阅读次数:
1534
Ref类是Cocos2d-x根类,Cocos2d-x中的很多类都派生自它,例如,我们熟悉的节点类Node也派生自Ref。我们介绍Ref内存管理。内存引用计数Ref类设计来源于Cocos2d-iphone的CCObject类,在Cocos2d-x 2.x中也叫CCObject类。因此Ref类的内存管理是参考Objective-C手动管理引用计数(Reference Count)而设计的。如图所示是内...
分类:
其他好文 时间:
2014-11-04 21:13:20
阅读次数:
329
刚才编译一个pthread的单文件程序, 使用的命令行是:gcc -o thread1 -lpthread thread1.c 结果报错:1 $ gcc -o thread1 -lpthread thread1.c2 /tmp/ccNqs6Bh.o: In function `main':3 th....
分类:
其他好文 时间:
2014-11-04 21:05:40
阅读次数:
161
ViewController.h中定义按钮 btn1;
@property (weak,
nonatomic) IBOutlet
UIButton *btn1;
ViewController.m中实现按下按钮跳转到:qqqViewController;
- (IBAction)btn1:(i...
分类:
移动开发 时间:
2014-11-04 19:48:45
阅读次数:
196
一、前言
ios开发中,@property的修饰就有很多的修饰词,如retain、assign、strong、weak、nonatomic等等,而这些修饰词在ARC模式下与非ARC模式下也是略有不同。下面先简单说说ARC模式
二、什么是ARC
ARC是iOS 5推出的新功能,全称为Automatic Reference Counting。一句话说,...
分类:
移动开发 时间:
2014-11-04 19:47:10
阅读次数:
262
This is the main reference for the World of Warcraft Lua Runtime. Note that these are mostly standard Lua functions, available in most Lua environment...
分类:
其他好文 时间:
2014-11-04 19:32:04
阅读次数:
311