On Wed, 23 Jan 2008, Randy Portnoff wrote: > Consider the following example: > func main() > local bTest := GetBlock() > ? Eval( bTest ) // Prints "Hello!" from local var in GetBlock() > return nil > > func GetBlock() > local cSomeVar := "Hello!" > return { || cSomeVar } > > Is this safe?
Yes it is because we have "detached" locals. > Will the garbage collector eventually clean this string? Not string but detached item and not by GC but when all references to detached item comes to 0. Our GC frees only complex variables with cyclic references. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour