Re: Release memory?
- Posted by r.schr at t-online.de Sep 18, 2002
- 522 views
Juergen Luethje wrote: > > > Hi all, > > I've got a question about sequences. For instance, assume the following > code: > > ----------------------------------- > include file.e > object list > sequence file_list, entry > > file_list = {} > list = dir("test.*") > if sequence(list) then > for i = 1 to length(list) do > entry = list[i] > if not find('d', entry[D_ATTRIBUTES]) then > file_list = append(file_list, entry[D_NAME]) > end if > end for > list = {} -- ? > entry = {} -- ? > end if > ? length(file_list) > ----------------------------------- > > If I don't use 'list' and 'entry' any more in the rest of the program, > is it a good idea to assign empty sequences to them in order to release > memory? Hi Juergen, why you don't put this code into a function and return only length(...)? After leaving the function, all private variables should be freed?! Have a nice day, Rolf