[Swift-devel] variable cleanup
Mihael Hategan
hategan at mcs.anl.gov
Tue Jul 5 16:51:41 CDT 2011
There is code in trunk now to clean up variables when they go out of
scope. This applies to compound procedure scopes, iterate scopes,
foreach scopes and if/[then|else]. And this reminds me, the main/program
scope should also have this.
Cleanup means that:
- some of the in-memory data is nullified. I'm not sure this is
necessary since the data should be garbage collected by the java GC.
- some mappers (in particular ones advertising themselves as temporary -
e.g. concurrent) should remove the files that they created
Sadly this isn't fully what I wanted, for example:
file a[] <some proper mapper>;
foreach i in [1:1000000] {
a[i] = generate(i);
}
In the above case it would be nice if no memory reference would be held
to the various a[i] after they are "assigned".
More information about the Swift-devel
mailing list