MCPcopy Create free account
hub / github.com/ImageEngine/cortex / defaultObjectPool

Method defaultObjectPool

src/IECore/ObjectPool.cpp:140–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140ObjectPool *ObjectPool::defaultObjectPool()
141{
142 static ObjectPoolPtr c = nullptr;
143 if( !c )
144 {
145 const char *m = getenv( "IECORE_OBJECTPOOL_MEMORY" );
146 size_t mi = m ? boost::lexical_cast<size_t>( m ) : 500;
147 c = new ObjectPool(1024 * 1024 * mi);
148 }
149 return c.get();
150}
151
152/// make sure the default pool is created at load time and avoid
153/// running conditions on multi-threaded environments.

Callers 3

testConstructorMethod · 0.80
testConstructorsMethod · 0.80
testDefaultMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 1

testConstructorMethod · 0.64