Program Skill
godwater8
这个作者很懒,什么都没留下…
展开
-
不同模块间对象的传递和释放
今天下午我在释放一个dll中动态分配的内存的时候,居然发生错误,释放失败,回想一下以前似乎也遇到过,解决方法就是哪儿创建的在哪儿释放。VTK中的做法是使用静态的New()方法构造,Release()方法释放。如:class Obj{public: static Obj* New() { return new Obj(); } void Release()原创 2006-08-21 23:26:00 · 895 阅读 · 0 评论 -
One Day Working for a Bug
This morning a bug was reported to me. I tried to find what cause it, and till this afternoon I found it.The bug was caused by a static varient in a member function. It stay on FALSE from the last c原创 2007-01-12 23:22:00 · 548 阅读 · 0 评论 -
解决eclipse崩溃问题
我用的Eclipse3.3,由于项目比较大,所以经常崩溃,改了配置文件也不管用(eclipse.ini),内存使用到186M左右就挂。。。。原文件内容:-showsplashorg.eclipse.platform--launcher.XXMaxPermSize256M-vmargs-Dosgi.requiredJavaVersion=1.5-Xms40m-Xmx512m 换了新的就好了-v原创 2007-12-08 03:46:00 · 3010 阅读 · 0 评论