Re: [Rcpp-devel] Strange behavior with boost::program_options

2016-07-06 Thread Watal M. Iwasaki
Thank you for the quick and kind reply, Kevin! You are right. I confirmed that the program option object is defined as a local variable in mylib::Simulation constructor, and is destructed correctly. But I found that the object is initialized with other objects from several source files, and they w

Re: [Rcpp-devel] Strange behavior with boost::program_options

2016-07-05 Thread Kevin Ushey
If I had to guess, maybe there is some initialization that occurs when your mylib::Simulation object is constructed, and you need to ensure that code is only run once? (Perhaps the code that defines the program options needs to be hidden behind an initialization flag, or something like that) Nonet