STL中的分配器allocators

int * p = allocator<int>().allocate(512, (int *)0); allocator<int>().deallocate(p, 512); allocator<int>()直接加括號是建立一個臨時對象,刪除分配的空間時,須要指定大小個數。設計 allocator以 ::operator new 和 ::operator delete 完成allocator和d
相關文章
相關標籤/搜索