lua-users home
lua-l archive

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


> Why is it that COM objects are not gc'ed (Released) when Lua exits?

Why do I need to call collectgarbage() for the Excel instance to be closed?  I have tried using weak tables and control-z followed by control-c.  I have to call collectgarbage() before the Lua interpreter terminates.  Does the garbage collector run when the process terminates?

C:\Users\Mike>lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require"luacom"
> e=luacom.GetObject("Excel.Application")
> e=nil
> collectgarbage()

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential or proprietary to K&L Microwave, Inc. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.