lua-users home
lua-l archive

Re: Is breaking out of io.lines(file) safe?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Mar 21, 2011 at 1:51 PM, Steve Litt <slitt@troubleshooters.com> wrote:
> In the same vain, in C I always free()
> whatever I malloc(), even though I know the memory will be given back on
> program termination.
This isn't really the best (or fair) analogy. Your memory is never
eventually garbage collected *during* program execution. In contrast,
the files Lua opens will eventually be garbage collected (and thus
closed).
-- 
- Patrick Donnelly

AltStyle によって変換されたページ (->オリジナル) /