Example #1
0
static void ref_walker_release( struct ref_walker * self )
{
    KDirectoryRelease( self->dir );
    VDBManagerRelease( self->vmgr );
    VSchemaRelease( self->vschema );
    AlignMgrRelease ( self->amgr );
    VFSManagerRelease ( self->vfs_mgr );
    VNamelistRelease ( self->sources );
    free_ref_regions( &self->regions );
    free( ( void * )self->spot_group );
}
Example #2
0
void free_trans_ctx( trans_ctx * ctx )
{
    if ( ctx->dir != NULL ) KDirectoryRelease( ctx->dir );
    ctx->dir = NULL;
    if ( ctx->vdb_mgr != NULL ) VDBManagerRelease( ctx->vdb_mgr );
    ctx->vdb_mgr = NULL;
    if ( ctx->db != NULL ) VDatabaseRelease ( ctx->db );
    ctx->db = NULL;
    if ( ctx->ref_list != NULL ) ReferenceList_Release( ctx->ref_list );
    ctx->ref_list = NULL;
    if ( ctx->almgr != NULL ) AlignMgrRelease ( ctx->almgr );
    ctx->almgr = NULL;
}
Example #3
0
LIB_EXPORT rc_t CC AlignmentIteratorRelease( const AlignmentIterator * cself )
{
    rc_t rc = 0;
    if ( cself == NULL )
        rc = RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
    else
    {
        if ( KRefcountDrop( &cself->refcount, "AlignmentIterator" ) == krefWhack )
        {
            AlignmentIterator * self = ( AlignmentIterator * ) cself;
            AlignMgrRelease ( self->amgr );
            if ( self->free_on_whack )
                free( self );
        }
    }
    return rc;
}
Example #4
0
LIB_EXPORT rc_t CC ReferenceIteratorRelease ( const ReferenceIterator *cself )
{
    rc_t rc = 0;
    if ( cself == NULL )
        rc = RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
    else
    {
        if ( KRefcountDrop( &cself->refcount, "ReferenceIterator" ) == krefWhack )
        {
            ReferenceIterator * self = ( ReferenceIterator * ) cself;
            /* we 'own' the records! - we have to destroy them, if some are left in here */
            clear_spot_group_list( &self->spot_groups );
            rc = PlacementSetIteratorRelease ( self->pl_set_iter );
            AlignMgrRelease ( self->amgr );
            free( self );
        }
    }
    return rc;
}
Example #5
0
LIB_EXPORT rc_t CC PlacementSetIteratorRelease ( const PlacementSetIterator *cself )
{
    rc_t rc = 0;
    if ( cself == NULL )
        rc = RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
    else
    {
        if ( KRefcountDrop( &cself->refcount, "PlacementSetIterator" ) == krefWhack )
        {
            PlacementSetIterator * self = ( PlacementSetIterator * ) cself;

            pl_set_iter_clear_curr_ref_window( self );
            pl_set_iter_clear_curr_ref( self );

            /* release the DLList of pi-ref's and the pi's in it... */
            DLListWhack ( &self->pi_refs, pi_ref_whacker, NULL );

            AlignMgrRelease ( self->amgr );

            free( self );
        }
    }
    return rc;
}