#include "MemoryPool.h"
#include <iostream>
using namespace std;
int main()
{
MemoryPool<int> myPool(100);
int *p=myPool.New();
int* q=myPool.New();
int count=myPool.GetFreeCount();
cout<<"free£º"<<count<<endl;
myPool.Delete(p);
count=myPool.GetFreeCount();
cout<<"free£º"<<count<<endl;
myPool.Delete(p);
count=myPool.GetFreeCount();
cout<<"free£º"<<count<<endl;
getchar();
return 0;
}
评论2
最新资源