lua-users home
lua-l archive

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


Hello Cosmin,

Saturday, May 30, 2009, 12:19:23 PM, you wrote:

> I wasn't very clear -- sorry -- what I meant was that I shouldn't care
> about freeing external resource in the same way I don't care about
> freeing a string or a table. They are all resources. Sure, strings and
> tables are internally managed by the gc and so their release can be
> delayed, while external resouces are not, but as a user, what do I
> care? You shouldn't bring this on me. I'd rather have them all hooked
> to the semantics of the gc and not surface out, in the same way that
> the emergency gc doesn't surface out in userland.

you can't work this way with external resources. imagine for example
that your program opens files and process it some way. if file will be
not closed until gc/exit, user trying to remove this file from other
program will got unexpected fail


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin@gmail.com