回忆 oc 的内存管理:objective-c 语法快速过(6)内存管理原理,objective-c 语法快速过(7)编译器特性ARCARC是苹果为了简化程序员对内存的管理,推出的一套内存管理机制,使用ARC机制,对象的申请和释放工作会在运行时,由编译器自动在代码中添加retain和release1...
分类:
移动开发 时间:
2015-03-08 20:04:48
阅读次数:
5961
笔者在阅读中总结了一下,在iOS平台容易引起循环引用的四个场景:一、parent-child相互持有、委托模式【案例】:@interface FTAppCenterMainViewController (){}@property(weak,nonatomic) UITableView* myTabl...
分类:
移动开发 时间:
2015-03-07 18:36:57
阅读次数:
145
原文: 数据库管理——安全管理——识别SQLServer中空密码或者弱密码的登录名 原文译自: http://www.mssqltips.com/sqlservertip/2775/identify-blank-and-weak-passwords-for-sql-server-logins/?ut...
分类:
数据库 时间:
2015-03-06 12:27:21
阅读次数:
229
copy: NSString\NSMutableString\block (release旧值,copy新值)weak: 代理\UI控件 (修饰弱引用的属性)strong: 其他OC对象 (修饰强引用的属性)assign: 基本数据类型 (直接赋值默认)Readonly:只读,只会生成gette.....
分类:
其他好文 时间:
2015-03-06 10:00:21
阅读次数:
128
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "ins...
分类:
系统相关 时间:
2015-03-05 16:15:41
阅读次数:
182
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gambler...
分类:
系统相关 时间:
2015-03-05 14:55:12
阅读次数:
197
import?UIKit
class?ViewController:?UIViewController?{
????@IBOutlet?weak?var?display:?UILabel!
????
????var?userIsInputingDigit?:Bool??=?false
????@IBAction?func?a...
分类:
编程语言 时间:
2015-03-01 18:37:26
阅读次数:
180
C++ 智能指针
flyfish 2015-3-1
使用原始指针进行显示内存管理在性能上有优势,但容易出错。诸如 野指针,重复释放,内容泄露等。
C++为了在编程语言上支持更好的内存管理机制,C++98提供了auto_ptr,因为auto_ptr的缺点在C++11中被废弃,C++11提供了
unique_ptr,shared_ptr,weak_ptr等智能指针在自动回收堆分配的内存,智能指...
分类:
编程语言 时间:
2015-03-01 17:09:47
阅读次数:
253
前几话中我们搞定了布局,这一话我们首先要把引用全部加上,就是连线到控制器中
UIViewController {
@IBOutlet weak var textField1: UITextField!
@IBOutlet weak var web1: UIWebView!
然后就是代理,首先来看一下我们手机场景界面上的三个按钮:
第一个按钮是控制器本身,第二个按钮是...
分类:
编程语言 时间:
2015-02-28 20:22:17
阅读次数:
197
@property属性使用copy:NSStringstrong: 一般对象weak: UI空间assign:基本数据类型retain: (对象,先上述类型使用)id 万能指针。id缺点:运行时可能因为类型强制错误而引发错误。instancetype 类型不匹配时编译会提示。
分类:
移动开发 时间:
2015-02-28 16:07:36
阅读次数:
124