当我们有一个threadvar声明,当这个变量将被初始化(对象被创建)?它是否发生在var的第一个赋值?例如:
threadvar myThreadVar : string; ...... //inside a thread ... myThreadVar := 'my value'; // In this point the var will be initialized?
如果我在线程设置了var的值之后尝试在线程之外使用此var,会发生什么?例如:
//at the main thread (application) ... //Call the thread; //thread finishes execution //thread is destroyed ShowMessage(myThreadVar); // what happens here?