#include "KomObjectPool.h"
using namespace Kom;
#include <iostream>
using namespace std;
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
class Test
{
private:
int a;
public:
Test(int x) : a (x) {}
int get(void) { return a; }
};
int main()
{
{
ObjectPool<Test> op;
for (int i = 0; i < 100; ++i)
{
Test * p = op.Construct(i);
cout << p->get() << endl;
}
}
_CrtDumpMemoryLeaks();
}