C++
hnuzcl
这个作者很懒,什么都没留下…
展开
-
boost内存管理
object_pool是用于类对象的内存池,他的功能与pool类似,但他会在析构时对所有已经分配的内存块调用析构函数,从而正确的释放资源。 #include <boost/pool/object_pool.hpp> using namespace boost; struct demoClass { public : int a,b,c; demoClass(int x=1,int y=2,int z=3):a(x),b(y),c(z){} }; int main原创 2021-05-10 19:44:14 · 173 阅读 · 0 评论 -
输出程序段执行的时间
#include <boost/progress.hpp> { boost::progresss_timer t; //第一个计时 //do something } //在这.原创 2021-05-08 21:12:15 · 71 阅读 · 0 评论