Beispiel #1
0
static void CC entrez_context_whack( void *ptr )
{
    entrez_context_t * ctx = ( entrez_context_t * )ptr;
    if ( ctx )
    {
        KEntrezFetcherRelease( ctx->entrez_fetcher );
        KUrlFetcherRelease( ctx->url_fetcher );
        free( ctx );
    }
}
Beispiel #2
0
rc_t KEntrezFetcherRelease ( const KEntrezFetcher *cself )
{
    KEntrezFetcher *self = ( KEntrezFetcher* ) cself;
    if ( cself != NULL )
    {
        switch ( KRefcountDrop ( & self -> refcount, classname ) )
        {
        case krefWhack:
            {
                KUrlFetcherRelease ( self -> url_fetcher );
                if ( self -> uri ) free( self -> uri );
                free( self );
                return 0;
            }
        case krefLimit:
            return RC ( rcApp, rcFunction, rcReleasing, rcRange, rcExcessive );
        }
    }
    return 0;
}