Assumed I have following static variable within a method:
void myClass::myFct()
{
static int myvar=0;
...
}
The behaviour is clear, "myvar" is initialised only once and whenever it is changed during "..." on next call of myFct(), the last value of myvar can be seen but not the initial value.
Now my question: what happens when the class "myClass" is deleted and then created again? Does this affect "myvar" (means is it initialised again) or is it left untouched and also after deletion/construction of the parent class the last (modified) value can be seen there?
Thanks!