码迷,mamicode.com
首页 >  
搜索关键字:weak reference    ( 6649个结果)
weak和拷贝
weak/拷贝1. weak只要没有strong指针指向对象,该对象就会被销毁2. 拷贝NSString和block用copycopy语法的作用产生一个副本修改了副本(源对象)并不会影响源对象(副本)实现拷贝的方法copy: 返回的是不可变副本可变字符串调用copy生成不可变的副本副本与源对象(不可...
分类:其他好文   时间:2015-08-25 23:11:19    阅读次数:144
Terracotta tc-config.xml配置说明(这个真的是转的)
<?xml version="1.0" encoding="UTF-8" ?> <!-- All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. --> <!-- ? tc-config-reference.xml ? This is a sample Terraco...
分类:其他好文   时间:2015-08-25 19:46:33    阅读次数:211
三元逆序对 求i<j<k && a[i]>a[j]>a[k] 的对数 树状数组Codeforces 61E Enemy is weak
http://codeforces.com/problemset/problem/61/E E. Enemy is weak time limit per test 5 seconds memory limit per test 256 megabytes input standard input output stan...
分类:编程语言   时间:2015-08-25 19:45:05    阅读次数:600
Effective C++ 条款21必须返回对象时,别妄想返回其reference
1. 虽然一般情况下传参使用const-by-reference-to-const比较好,但返回值有时必须是对象而不是引用: 当reference绑定到函数内创建的局部对象时,函数调用结束后引用绑定在一个不存在的对象; 当reference绑定到堆内存对象时,函数调用后比较容易忽略内存释放,特别.....
分类:编程语言   时间:2015-08-25 19:22:59    阅读次数:134
Effective C++ 条款20 宁以pass-by-reference-to-const替换pass-by-value
1. 以reference-to-const传递参数的优点: 避免局部对象的构造和析构,节省时间和空间; 避免参数派生类对象向基类对象传递时的"对象切割",实现面向对象;2. reference虽然是"别名",但是底层实现往往是指针,因此对于内置类型,选用pass-by-value效率更高.这也.....
分类:编程语言   时间:2015-08-25 19:11:08    阅读次数:136
Item 10:赋值运算符要返回自己的引用 Effective C++笔记
Item 10:Have assignment operators return a reference to *this. 这是关于赋值运算符的编程惯例,用来支持链式的赋值语句: int x, y, z; ... x = y = z = 1; 在C++中,它相当于: x = ( y = ( z = 1 ) ); 这是因为=运算符是右结合的,链式赋值时...
分类:编程语言   时间:2015-08-25 16:34:23    阅读次数:146
usr/bin/ld: cannot find 错误解决方法和 /etc/ld.so.conf
我makefile出现这个错误:HelloWorldServer.c:(.text+0xaa): undefined reference to `zmq_send'collect2: error: ld returned 1 exit statusmake: *** [HelloWorldServe...
分类:其他好文   时间:2015-08-25 15:59:58    阅读次数:13927
Yii使用CForm类(Form builder)上传文件
模型(model)首先需要一个文件上传的模型:FileUpload.php true, 'types' => 'jpg, jpeg, gif, png'), ); } }注意:> 关于更多验证规则的说明请查看 Reference: Model rules valida...
分类:Web程序   时间:2015-08-25 15:53:27    阅读次数:190
The .NET weak event pattern in C#
Introduction As you may know event handlers are a common source of memory leaks caused by the persistence of objects that are not used anymore, and yo...
分类:Windows程序   时间:2015-08-25 14:10:11    阅读次数:364
readonly,readwrte,@property,nonatomic,assign,retain,copy,strong,weak属性关键字
1.readonly是只读2.readwrite是读写3.@property关键字:设置成员变量的属性(有读/写,赋值assign,retain,copy ,以及对多线程的支持nonatomic)。4.nonatomic非原子性访问,对属性赋值的时候不加锁,多线程并发访问会提高性能。如果不加此属性,...
分类:其他好文   时间:2015-08-21 15:20:35    阅读次数:288
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!