
07-15-2007, 09:12 PM
|
|
Graal Administration
|
Join Date: Jan 2000
Location: Admins
Posts: 11,693
|
|
|
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. |
|
|
|