Changeset 4881

Show
Ignore:
Timestamp:
08/24/07 11:52:26 (1 year ago)
Author:
morris
Message:

Remember multiple autorelease locations

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/misc/wi-pool.c

    r4855 r4881  
    331331         
    332332        if(_wi_pool_debug) { 
    333                 location = wi_string_init_with_format(wi_string_alloc(), WI_STR("%s:%u"), file, line); 
    334                 wi_hash_set_data_for_key(pool->locations, location, instance); 
    335                 wi_release(location); 
     333                location = wi_hash_data_for_key(pool->locations, instance); 
     334                 
     335                if(location) { 
     336                        wi_string_append_format(location, WI_STR(", %s:%u"), file, line); 
     337                } else { 
     338                        location = wi_string_init_with_format(wi_string_alloc(), WI_STR("%s:%u"), file, line); 
     339                        wi_hash_set_data_for_key(pool->locations, location, instance); 
     340                        wi_release(location); 
     341                } 
    336342        } 
    337343         
  • libwired/trunk/libwired/misc/wi-pool.h

    r4774 r4881  
    3333#include <wired/wi-runtime.h> 
    3434 
    35 #define wi_autorelease(instance) \ 
    36         _wi_autorelease((instance), __FILE__, __LINE__) 
     35#define wi_autorelease(instance)        _wi_autorelease((instance), __FILE__, __LINE__) 
    3736 
    3837