Changeset 5053

Show
Ignore:
Timestamp:
12/02/07 20:52:14 (9 months ago)
Author:
morris
Message:

Mark as released magic after dealloc has run so we can use the object in the dealloc methods

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/base/wi-runtime.c

    r4774 r5053  
    262262         
    263263        wi_recursive_lock_lock(_wi_runtime_retain_count_lock); 
    264  
     264         
    265265        if(--WI_RUNTIME_BASE(instance)->retain_count == 0) { 
    266266                if(_wi_zombie_enabled && WI_RUNTIME_BASE(instance)->id != wi_pool_runtime_id()) { 
     
    276276                        wi_recursive_lock_unlock(_wi_runtime_retain_count_lock); 
    277277                } else { 
    278                         WI_RUNTIME_BASE(instance)->magic = _WI_RUNTIME_RELEASED_MAGIC; 
    279  
    280278                        wi_recursive_lock_unlock(_wi_runtime_retain_count_lock); 
    281279                         
     
    285283                                class->dealloc(instance); 
    286284 
     285                        WI_RUNTIME_BASE(instance)->magic = _WI_RUNTIME_RELEASED_MAGIC; 
     286                         
    287287                        wi_free(instance); 
    288288                }