lua-users home
lua-l archive

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



On 29-Aug-05, at 2:51 PM, William Trenker wrote:

Is the following an acceptable use of the colon with io functions?

kernelinfo = io.open("/proc/version"):read()
machinetype = io.popen("uname -m"):read()


yes

I just want to be sure that this won't leave a file handle or related
resources dangling.

The garbage collector will deal with it eventually, which is probably good enough.