/* Function: free_SpliceSiteScore(obj) * * Descrip: Free Function: removes the memory held by obj * Will chain up to owned members and clear all lists * * * Arg: obj [UNKN ] Object that is free'd [SpliceSiteScore *] * * Return [UNKN ] Undocumented return value [SpliceSiteScore *] * */ SpliceSiteScore * free_SpliceSiteScore(SpliceSiteScore * obj) { int return_early = 0; if( obj == NULL) { warn("Attempting to free a NULL pointer to a SpliceSiteScore obj. Should be trappable"); return NULL; } #ifdef PTHREAD assert(pthread_mutex_lock(&(obj->dynamite_mutex)) == 0); #endif if( obj->dynamite_hard_link > 1) { return_early = 1; obj->dynamite_hard_link--; } #ifdef PTHREAD assert(pthread_mutex_unlock(&(obj->dynamite_mutex)) == 0); #endif if( return_early == 1) return NULL; if( obj->score != NULL) free_pwmDNAScore(obj->score); ckfree(obj); return NULL; }
/* Function: free_SpliceSiteScore(obj) * * Descrip: Free Function: removes the memory held by obj * Will chain up to owned members and clear all lists * * * Arg: obj [UNKN ] Object that is free'd [SpliceSiteScore *] * * Return [UNKN ] Undocumented return value [SpliceSiteScore *] * */ SpliceSiteScore * free_SpliceSiteScore(SpliceSiteScore * obj) { if( obj == NULL) { warn("Attempting to free a NULL pointer to a SpliceSiteScore obj. Should be trappable"); return NULL; } if( obj->dynamite_hard_link > 1) { obj->dynamite_hard_link--; return NULL; } if( obj->score != NULL) free_pwmDNAScore(obj->score); ckfree(obj); return NULL; }