| 363 | */ |
| 364 | |
| 365 | void object_done() |
| 366 | { |
| 367 | #ifdef BJAM_NEWSTR_NO_ALLOCATE |
| 368 | unsigned i; |
| 369 | for ( i = 0; i < strhash.num; ++i ) |
| 370 | { |
| 371 | while ( strhash.data[ i ] ) |
| 372 | { |
| 373 | struct hash_item * item = strhash.data[ i ]; |
| 374 | strhash.data[ i ] = item->header.next; |
| 375 | BJAM_FREE( item ); |
| 376 | } |
| 377 | } |
| 378 | #else |
| 379 | /* Reclaim string blocks. */ |
| 380 | while ( strblock_chain ) |
| 381 | { |
| 382 | strblock * const n = strblock_chain->next; |
| 383 | BJAM_FREE( strblock_chain ); |
| 384 | strblock_chain = n; |
| 385 | } |
| 386 | #endif |
| 387 | |
| 388 | string_set_done( &strhash ); |
| 389 | |
| 390 | if ( DEBUG_MEM ) |
| 391 | { |
| 392 | out_printf( "%dK in strings\n", strtotal / 1024 ); |
| 393 | if ( strcount_in != strcount_out ) |
| 394 | out_printf( "--- %d strings of %d dangling\n", strcount_in - |
| 395 | strcount_out, strcount_in ); |
| 396 | } |
| 397 | } |
no test coverage detected