.oct files - keeping state across calls
dbateman
dbateman at free.fr
Mon Jul 6 10:20:43 CDT 2009
Christophe Tournery-2 wrote:
>
> Both mylib_init() and mylib_process() must share a list of allocated
> handles and internal states of mylib. In octave 3.0 I used a static
> std::map in my .cc file for the handles and that worked. In octave 3.2
> this fails. It seems that in 3.2 the .oct file is loaded twice, once
> for mylib_init() and once for mylib_process(), therefore the static
> variable trick does not work anymore since they have different
> addresses.
>
If you use the "mlock" function in the first call to the oct-file it should
never be reloaded, and won't be cleared by a call to "clear all".. Does that
work for you?
D.
--
View this message in context: http://www.nabble.com/.oct-files---keeping-state-across-calls-tp24354462p24357169.html
Sent from the Octave - General mailing list archive at Nabble.com.
More information about the Help-octave
mailing list