[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .oct files - keeping state across calls
From: |
dbateman |
Subject: |
Re: .oct files - keeping state across calls |
Date: |
Mon, 6 Jul 2009 08:20:43 -0700 (PDT) |
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.
- .oct files - keeping state across calls, Christophe Tournery, 2009/07/06
- Re: .oct files - keeping state across calls,
dbateman <=
- Re: .oct files - keeping state across calls, Christophe Tournery, 2009/07/07
- Re: .oct files - keeping state across calls, David Bateman, 2009/07/09
- Re: .oct files - keeping state across calls, Christophe Tournery, 2009/07/13
- Re: .oct files - keeping state across calls, John W. Eaton, 2009/07/13
- Re: .oct files - keeping state across calls, Christophe Tournery, 2009/07/14
- Re: .oct files - keeping state across calls, John W. Eaton, 2009/07/14
- Re: .oct files - keeping state across calls, Christophe Tournery, 2009/07/22
- Re: .oct files - keeping state across calls, John W. Eaton, 2009/07/14
- Re: .oct files - keeping state across calls, Christophe Tournery, 2009/07/14
- Re: .oct files - keeping state across calls, David Bateman, 2009/07/16