Re: userdata access after __gc?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: userdata access after __gc?
- From: Josh Haberman <jhaberman@...>
- Date: 2012年10月16日 17:32:10 -0700
On Tue, Oct 16, 2012 at 5:00 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> The standard io library does not do this. It sets the file handle to
> NULL so that it can issue a "closed file" error message when the user
> tries to use an invalid file handle.
Yes, I prefer this solution also, since an error message like "attempt
to index field '?' (a user data value)" could be very confusing to a user.
Thanks for the answers everyone.
Josh