Пример #1
0
int Trick::DataRecordGroup::shutdown() {

    unsigned int jj ;

    // Force write out all data
    record = true ; // If user disabled group, make sure any recorded data gets written out
    write_data(true) ;
    format_specific_shutdown() ;

    for (jj = 0; jj < rec_buffer.size() ; jj++) {
        delete rec_buffer[jj] ;
    }
    rec_buffer.clear() ;

    for (jj = 0; jj < change_buffer.size() ; jj++) {
        delete change_buffer[jj] ;
    }
    change_buffer.clear() ;

    if ( writer_buff ) {
        free(writer_buff) ;
        writer_buff = NULL ;
    }

    return 0 ;
}
Пример #2
0
int Trick::DataRecordGroup::shutdown() {

    // Force write out all data
    record = true ; // If user disabled group, make sure any recorded data gets written out
    write_data(true) ;
    format_specific_shutdown() ;

    remove_all_variables();

    // remove_all_variables does not remove sim time
    delete rec_buffer[0];
    rec_buffer.clear();

    if ( writer_buff ) {
        free(writer_buff) ;
        writer_buff = NULL ;
    }

    return 0 ;
}