摘要: 一段漂亮的代码必须考虑到内存泄漏的问题,而内存泄漏根本原因是因为你的程序在heap中分配的内存没有释放掉,当然没有释放掉的原因很多,最简单的就是你new完之后没有写delete,当然还有很多其他的原因,下面是我最近的一些新得。 #include <iostream>using namespace std;#define true 1class A{private: int n;public: A(int m){ cout<<"A() is called\n";} ~A(){ cout<<"~A() is called\n&quo 阅读全文
posted @ 2013-01-09 22:47 GOD_YCA 阅读(1409) 评论(0) 推荐(2)
摘要: Check if your commits haveChange-Id: ...in their descriptions. Every commit should have them.you can "git log" to review your commits haveChange-IdIf no, usegit rebase -ito reword the commit messages and add proper Change-Ids (usually this is a SHA1 of the first version of the reviewed com 阅读全文
posted @ 2013-01-09 17:47 GOD_YCA 阅读(3542) 评论(0) 推荐(0)