| 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 |
no test coverage detected