Quote:
Originally Posted by Stefan
TStaticVar is called like that because it is not just a variant variable, which is just containing a single value of dynamic type.
When you assign a TStaticVar to a normal variable, then only a link to the TStaticVar is remembered. When there is no link to a TStaticVar anymore, then the variable will be deleted on the next run of the garabage collector.
In v4 the garbage collector has been improved to delete two (or more) TStaticVars which are only referencing each other. TStaticVars can only survive that when there is a global variable which is directly or indirectly linking to them.
|
Wait... If I just use temp.vars for my TStaticVars then they won't work now?
