Re: Is this leaking?
- Posted by Kat <KSMiTH at PELL.NET> Nov 28, 1999
- 445 views
----- Original Message ----- From: Robert Craig <rds at ATTCANADA.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Sunday, November 28, 1999 10:38 PM Subject: Re: Is this leaking? > Conclusion: maybe the optimizer should be a bit smarter. Like not optimizing inside a loop until forced to? > > My best guess is that maybe it's not releasing the memory > > used by the temporary sequences formed by the > > concatenation until after it exits the loop, > > I don't think you are running out of space. > Euphoria recycles the space as it goes, inside the loop. > It doesn't wait until after the loop to do it. You will however > have a copy of r2 stored in an internal temporary variable. Maybe this is a good example of the programmer knowing there are enough resources available,, or testing to be sure while running, and inhibiting a garbage collection until done with this loop? Like, inside the loop: if $availmem < SomeVal ) { DoGarbageCollection }? Kat, curious as.