help-octave
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]