Show
Ignore:
Timestamp:
08/13/09 15:58:32 (15 years ago)
Author:
vbarta
Message:

using shared_ptr in UI (optionally so far; loading & saving Array<T *> still works but should be phased out); testsuite run leaks down from 8822 to 480 bytes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/estim/kalman.cpp

    r477 r527  
    6464EKFfull::EKFfull ( ) : BM (), E() {}; 
    6565 
    66 void EKFfull::set_parameters ( diffbifn* pfxu0,  diffbifn* phxu0, const mat Q0, const mat R0 ) { 
     66void EKFfull::set_parameters ( const shared_ptr<diffbifn> &pfxu0, const shared_ptr<diffbifn> &phxu0, const mat Q0, const mat R0 ) { 
    6767        pfxu = pfxu0; 
    6868        phxu = phxu0; 
     
    168168 
    169169 
    170 void EKFCh::set_parameters ( diffbifn* pfxu0,  diffbifn* phxu0, const chmat Q0, const chmat R0 ) { 
     170void EKFCh::set_parameters ( const shared_ptr<diffbifn> &pfxu0, const shared_ptr<diffbifn> &phxu0, const chmat Q0, const chmat R0 ) { 
    171171        pfxu = pfxu0; 
    172172        phxu = phxu0; 
     
    255255 
    256256void EKFCh::from_setting ( const Setting &set ) { 
    257         diffbifn* IM = UI::build<diffbifn> ( set, "IM", UI::compulsory ); 
    258         diffbifn* OM = UI::build<diffbifn> ( set, "OM", UI::compulsory ); 
     257        shared_ptr<diffbifn> IM = UI::build<diffbifn> ( set, "IM", UI::compulsory ); 
     258        shared_ptr<diffbifn> OM = UI::build<diffbifn> ( set, "OM", UI::compulsory ); 
    259259 
    260260        //statistics 
     
    280280 
    281281        //connect 
    282         RV* drv = UI::build<RV> ( set, "drv", UI::compulsory ); 
     282        shared_ptr<RV> drv = UI::build<RV> ( set, "drv", UI::compulsory ); 
    283283        set_drv ( *drv ); 
    284         RV* rv = UI::build<RV> ( set, "rv", UI::compulsory ); 
     284        shared_ptr<RV> rv = UI::build<RV> ( set, "rv", UI::compulsory ); 
    285285        set_rv ( *rv ); 
    286286