码迷,mamicode.com
首页 >  
搜索关键字:shared elements tran    ( 12347个结果
《effective c++》读书笔记2
条款13:以对象管理资源 使用RAII,获得资源后立刻放进管理对象,管理对象运用析构函数确保资源被释放。 为防止资源泄露,请使用RAII对象,它们在构造函数中获得资源并在析构函数中释放资源。 两个常被使用的RAII类是tr1::shared_ptr和tr1::auto_ptr。前者通常是较佳选择,因为其拷贝行为比较直观。若选择auto_ptr,复制动作会使被复制物指向null.  条款14...
分类:编程语言   时间:2014-08-22 16:22:49    阅读次数:250
通过eclipse.ini修改Eclipse加载jdk的路径
这里直接把在网上的找到的答案记录下来,原文地址:http://www.oschina.net/question/109676_15561:如果出现启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误,原因1:给定目录下jvm.d...
分类:系统相关   时间:2014-08-21 22:39:54    阅读次数:707
cheap ghds this probably sounds really
I know cheap ghds this probably sounds really vain but I live in upstate NY and the elements sucks! I ghds am just in need of a few foils to embellish...
分类:其他好文   时间:2014-08-21 12:58:04    阅读次数:202
Sqlite3通过Makefile编译成动态链接库
TARGET_LIB:=libsqlite3.so LIBS := -lpthread -ldl CFLAGS := -g -Wall -shared -fPIC -I. $(LIBS) CC := mipsel-openwrt-linux-gcc #交叉编译下的编译路径 STRIP := mipsel-openwrt-linux-strip OBJ := sqlite3.o all...
分类:数据库   时间:2014-08-21 11:34:24    阅读次数:631
实现类似shared_ptr的引用计数
13.27 定义使用引用计数版本的HasPtr#include#include#includeusing namespace std;class HasPtr{public: HasPtr(const string &s=string()):ps(new string(s)),i(0),use...
分类:其他好文   时间:2014-08-20 23:59:13    阅读次数:474
Subsets II
Given a collection of integers that might contain duplicates, S, return all possible subsets.Note:Elements in a subset must be in non-descending order...
分类:其他好文   时间:2014-08-20 19:37:12    阅读次数:175
Effective C++ 条款15、16 在资源管理类中提供对原始资源的访问||成对使用new 与 delete要采取相同形式
1、在资源管理类中提供对原始资源的访问 前几个条款很棒,它们是对抗资源泄露的壁垒,但很多APIs直接指向 资源,这个时候,我们需要直接访问原始资源。 这里,有两种方法解决上述问题,我们可将RAII对象转换为原始资源。通过 显式转换与隐式转换。 通常,tr1:: shared_ptr 和 auto_p...
分类:编程语言   时间:2014-08-20 16:14:02    阅读次数:177
Effective C++ 条款17 以独立语句将newed对象置入智能指针
对于函数: int priority(); void processWidget(std::tr1:: shared_ptr pw,int priority); 调用以上函数 processWidget(new Widget,priority()); 以上调用错误,因为shared_ptr构造函数需...
分类:编程语言   时间:2014-08-20 16:11:22    阅读次数:194
block,inline和inline-block概念和区别
总体概念block和inline这两个概念是简略的说法,完整确切的说应该是 block-level elements (块级元素) 和 inline elements (内联元素)。block元素通常被现实为独立的一块,会单独换一行;inline元素则前后不会产生换行,一系列inline元素都在一行...
分类:其他好文   时间:2014-08-20 16:10:12    阅读次数:245
【Leetcode】4sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic...
分类:其他好文   时间:2014-08-20 14:06:32    阅读次数:182
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!