Sudden blackout and GV gone

 

Hello everyone. This has come up to me where I had sudden blackout and when I managed to get my PC up and running again, I opened the terminal (latest build) and it seems that the GV is gone for good. This has lead me to rebuild the GV from scratch.

I had 2 blackouts and same thing happens to the GV, gone for good.

Anyone experiencing the same problem?

 
Did you use GlobalVariablesFlush() in your code ?
 

So you saying all this time GV uses memory and will only write-to-disk once the terminal is being closed ?


Hmm ... Where should I use it ? Put it just before of return (0) ?

Or after every GlobalVariableSet ?

 
deysmacro:

So you saying all this time GV uses memory and will only write-to-disk once the terminal is being closed ?


Hmm ... Where should I use it ? Put it just before of return (0) ?

Or after every GlobalVariableSet ?


The GV is not written to file until the EA is unloaded, so yes you need to flush it to file if it is to be crash persistent. Immediately after GVset would probably be the best time.
 

Thanks.


The settings is the only thing that need to be persistent, the rest is just display information which can be rebuild automatically.

I think I will go for return (0) routine first. If it doesn't work good enough, after every GVSet it is.

Reason: