当前位置: 首页>>代码示例>>C++>>正文


C++ ObjectPool::size方法代码示例

本文整理汇总了C++中ObjectPool::size方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectPool::size方法的具体用法?C++ ObjectPool::size怎么用?C++ ObjectPool::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ObjectPool的用法示例。


在下文中一共展示了ObjectPool::size方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: destroyObjPool

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

	_g_objPool.destroy();
}
开发者ID:fengqk,项目名称:kbengine,代码行数:8,代码来源:udp_packet_receiver.cpp

示例2: destroyObjPool

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

	_g_objPool.destroy();
}
开发者ID:Weooh,项目名称:kbengine,代码行数:8,代码来源:tcp_packet.cpp

示例3: destroyObjPool

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

	_g_objPool.destroy();
}
开发者ID:Eayon,项目名称:kbengine,代码行数:8,代码来源:udp_packet_receiver.cpp

示例4: destroyObjPool

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

	_g_objPool.destroy();
}
开发者ID:MonsterCalvin,项目名称:kbengine,代码行数:8,代码来源:memorystream.cpp

示例5: destroyObjPool

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

	_g_objPool.destroy();
}
开发者ID:321543223,项目名称:kbengine,代码行数:8,代码来源:memorystream.cpp

示例6: destroyObjPool

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

	_g_objPool.destroy();
}
开发者ID:aabbox,项目名称:kbengine,代码行数:8,代码来源:bundle.cpp

示例7: main

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;
}
开发者ID:chxuan,项目名称:samples,代码行数:18,代码来源:main.cpp

示例8: createTexturePool

 UniqueTexturePool createTexturePool() {
     ObjectPool ids;
     MBGL_CHECK_ERROR(glGenTextures(TextureMax, ids.data()));
     assert(ids.size() == size_t(TextureMax));
     return UniqueTexturePool { std::move(ids), { this } };
 }
开发者ID:calendreco,项目名称:mapbox-gl-native,代码行数:6,代码来源:object_store.hpp


注:本文中的ObjectPool::size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。