0. 前言
c++默认赋值构造函数的返回值是引用类型,c++赋值运算符=的本意是返回左值的引用,我们重写赋值构造函数的时候,返回值是否应该设为引用类型呢?
按照《Effective C++》中第10条,最好是设为引用类型。 本文,通过实验来表述返回值是否为引用类型的区别。1. 内置类型 int...
分类:
编程语言 时间:
2014-07-22 23:08:15
阅读次数:
400
The general mechanism for executing tasks is
the executor service. If you think in terms of tasks and let an executor service
execute them for you, yo...
分类:
编程语言 时间:
2014-05-05 23:32:44
阅读次数:
389
Every class should clearly document its thread
safety properties with a carefully worded prose description or a thread safety
annotation. The synchron...
分类:
编程语言 时间:
2014-05-05 12:00:18
阅读次数:
437
这是一个比Josh Bloch的Effective
Java规则更精妙的10条Java编码实践的列表。和Josh
Bloch的列表容易学习并且关注日常情况相比,这个列表将包含涉及API/SPI设计中不常见的情况,可能有很大影响。我在编写和维护jOOQ(Java中内部DSL建模的SQL)时遇到过这些。...
分类:
编程语言 时间:
2014-05-05 11:38:28
阅读次数:
402
using wait and notify directly is like
programming in "concurrency assembly language," as compared to the higher-level
language provided by java.util....
分类:
编程语言 时间:
2014-05-04 11:04:34
阅读次数:
401
var Item1: TListViewItem;begin Item1 :=
ListView1.Items.Add; Item1.Purpose:=TListItemPurpose.Header;//
Item1.Purpose:=TListItemPurpose.Footer; Item1.t...
分类:
移动开发 时间:
2014-05-03 22:34:33
阅读次数:
547
private继承,在看到effective C++之前,我发现在我之前的代码里面,没有用到这个机制,但是认真回想起还是有一些影子。
大多数人认为private继承是没有用的,其实不然,在某些情况下,它也会带给你一些惊喜。
好,言归正传,之前已经数次提到过 public继承表示的是 “is a ”的关系,也就是说每一个derived对象D同时也是base对象,任何在
base对...
分类:
其他好文 时间:
2014-05-02 18:36:10
阅读次数:
376
When multiple threads share mutable data, each
thread that reads or writes the data must perform synchronization. Without
synchronization, there is no...
分类:
数据库 时间:
2014-05-01 09:14:25
阅读次数:
506
基础篇
objective-c基础教程
iphone 开发秘籍
进阶篇
iOS 6编程实战
Objective-C 高级编程:iOS与OS X多线程和内存管理
Effective Objective-C 2.0:编写高质量iOS与OS X代码的52个有效方法...
分类:
移动开发 时间:
2014-04-29 13:25:21
阅读次数:
402