⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 Many applications use connection/object pool. A program may require a IMAP connection pool and LDAP
💻 CPP
字号:
#include <iostream>
#include "PoolMgr.h"
#include "GenericObject.h"

using namespace std;

// poll test
int main()
{
	// get the pool instance
    PoolMgr<GenericObject> *pMgr = PoolMgr<GenericObject>::GetInstance();
	// initialize the pool
    pMgr->Init(10,600, false);
	// checkout the object
	GenericObject *pObj = pMgr->Checkout();
	if(pObj)
        pMgr->Checkin(pObj); // checkin the object
	// reset the pool
    pMgr->ResetPool();
	// delete the pool
	PoolMgr<GenericObject>::DeletePool();

    
	cout << "Enter any key to exit :";
    cin.get();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -