Why is the onexit function not executed?

Author: feng_yq, Created: 2015-07-24 11:10:17, Updated:

Writing a policy for statistics, ready to output the final statistical results with the onexit function, when retesting it found that the onexit function was not executed and the function name was changed to onExit. Please answer, thank you!

function onTick() { //do something here }

function onexit() { Log(“Exit now!!!”); }

function main() { for(var i=-30;i<31;i++) { g_s[i] = 0; }

while(true)
{
    onTick();
    
    Sleep(1000);
}

}


More

ZeroIn retesting, the main normal exit will trigger the onexit, your main will not exit, and in real time, clicking stop should trigger the onexit.