//-------------------------------------------------------------------------------------
void UDPPacketReceiver::destroyObjPool()
{
	DEBUG_MSG(boost::format("UDPPacketReceiver::destroyObjPool(): size %1%.\n") % 
		_g_objPool.size());

	_g_objPool.destroy();
}
Exemple #2
0
//-------------------------------------------------------------------------------------
void TCPPacket::destroyObjPool()
{
	DEBUG_MSG(fmt::format("TCPPacket::destroyObjPool(): size {}.\n", 
		_g_objPool.size()));

	_g_objPool.destroy();
}
//-------------------------------------------------------------------------------------
void UDPPacketReceiver::destroyObjPool()
{
	DEBUG_MSG(fmt::format("UDPPacketReceiver::destroyObjPool(): size {}.\n", 
		_g_objPool.size()));

	_g_objPool.destroy();
}
//-------------------------------------------------------------------------------------
void MemoryStream::destroyObjPool()
{
	DEBUG_MSG(boost::format("MemoryStream::destroyObjPool(): size %1%.\n") % 
		_g_objPool.size());

	_g_objPool.destroy();
}
Exemple #5
0
//-------------------------------------------------------------------------------------
void MemoryStream::destroyObjPool()
{
	DEBUG_MSG(fmt::format("MemoryStream::destroyObjPool(): size {}.\n", 
		_g_objPool.size()));

	_g_objPool.destroy();
}
Exemple #6
0
//-------------------------------------------------------------------------------------
void Bundle::destroyObjPool()
{
	DEBUG_MSG(fmt::format("Bundle::destroyObjPool(): size {}.\n", 
		_g_objPool.size()));

	_g_objPool.destroy();
}
Exemple #7
0
int main()
{
    ObjectPool<A> pool;
    pool.add(std::unique_ptr<A>(new A()));
    pool.add(std::unique_ptr<A>(new A()));
    std::cout << "Object pool size: " << pool.size() << std::endl;

    {
        auto a = pool.get();
        a->print();
        pool.get();
        std::cout << "Object pool size: " << pool.size() << std::endl;
    }

    std::cout << "Object pool size: " << pool.size() << std::endl;

    return 0;
}
 UniqueTexturePool createTexturePool() {
     ObjectPool ids;
     MBGL_CHECK_ERROR(glGenTextures(TextureMax, ids.data()));
     assert(ids.size() == size_t(TextureMax));
     return UniqueTexturePool { std::move(ids), { this } };
 }