#include "StdAfx.h" #include ".\updateagentsessionfactory.h" UpdateAgentSessionFactory::UpdateAgentSessionFactory(void) { } UpdateAgentSessionFactory::~UpdateAgentSessionFactory(void) { } VOID UpdateAgentSessionFactory::Init( DWORD dwMaxUserCount ) { if( !m_pAgentSessionPool ) { delete m_pAgentSessionPool; m_pAgentSessionPool = NULL; } m_pAgentSessionPool = new MemoryPool(dwMaxUserCount); } Session* UpdateAgentSessionFactory::AllocSession() { return m_pAgentSessionPool->Alloc(); } VOID UpdateAgentSessionFactory::Free( Session* pSession ) { if( !pSession ) return; m_pAgentSessionPool->Restore( (UpdateAgentSession*)pSession ); }