lua-users home
lua-l archive

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


2008/10/20 Hisham <hisham.hm@gmail.com>:
> On Mon, Oct 20, 2008 at 5:08 AM, Enrico Colombini <erix@erix.it> wrote:
>> Hisham wrote:
>>>
>>> It does have limitations. Two bits from my dissertation:
>>
>> Thanks. I read about the first part in Python's documentation, while I
>> missed the module behavior you mentioned (does that mean that modules are
>> never collected?)
>
> >From my experience, I recall that yes, they were never collected.

I think the issue is that although (pure Python) module objects *can*
get collected, it's hard to track down and delete all of the
references to the object. There's the module name itself, the
reference in sys.modules, references to the module in any instances of
classes defined by the module, etc etc etc. So in practical terms,
getting a module collected is hard.

C extensions are different again. I believe they don't ever get
collected (there's no C API for a full unload of an extension DLL, so
it can't be done cleanly - I think this is being addressed in Python
3.0)

Paul.