STL中的分配器allocators

int * p = allocator<int>().allocate(512, (int *)0); allocator<int>().deallocate(p, 512); allocator<int>()直接加括号是建立一个临时对象,删除分配的空间时,须要指定大小个数。设计 allocator以 ::operator new 和 ::operator delete 完成allocator和d
相关文章
相关标签/搜索