摘要:
【C++之auto_ptr】 std::auto_ptrstd::auto_ptr 属于 STL,当然在 namespace std 中,包含头文件 #include<memory> 便可以使用。std::auto_ptr 能够方便的管理单个堆内存对象。我们从代码开始分析:void TestAutoPtr() {std::auto_ptr<Simple> my_memory(new Simple(1)); // 创建对象,输出:Simple:1if (my_memory.get()) { // 判断智能指针是否为空my_memory->PrintSomething 阅读全文
posted @ 2013-03-09 14:12
Tekkaman
阅读(8387)
评论(1)
推荐(3)
摘要:
【Mac之理解Call&Ret】 1、对于下述代码: 产生的汇编指令是: 2、由上例可以总结出 1)函数返回值使用eax。 3、调用约定 4、调用实例展示 解析如下: 阅读全文
posted @ 2013-03-09 11:25
Tekkaman
阅读(298)
评论(0)
推荐(0)
浙公网安备 33010602011771号