MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / doUnregisterObject

Method doUnregisterObject

source/RenderGraph/GraphContext.cpp:364–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362 }
363
364 void GraphContext::doUnregisterObject( uint64_t object )
365 {
366 if ( object )
367 {
368 lock_type lock{ m_mutex };
369
370 if ( auto it = m_allocated.find( size_t( object ) );
371 it != m_allocated.end() )
372 {
373 std::stringstream stream;
374 stream.imbue( std::locale{ "C" } );
375 stream << "Destroyed " << it->second.type
376 << " [0x" << std::hex << std::setw( 8u ) << std::setfill( '0' ) << object << "]"
377 << " - " << it->second.name;
378 Logger::logTrace( stream.str() );
379 m_allocated.erase( it );
380 }
381 else
382 {
383 std::stringstream stream;
384 stream.imbue( std::locale{ "C" } );
385 stream << "Destroyed Unknown"
386 << " [0x" << std::hex << std::setw( 8u ) << std::setfill( '0' ) << object << "]"
387 << " - Unregistered";
388 Logger::logTrace( stream.str() );
389 }
390 }
391 }
392
393#endif
394

Callers 1

stUnregisterObjectMethod · 0.80

Calls 3

findMethod · 0.80
eraseMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected