Re: [ANNOUNCE] Objective Lua
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [ANNOUNCE] Objective Lua
- From: Mark Hamburg <mark@...>
- Date: Tue, 6 Oct 2009 07:11:21 -0700
On Oct 5, 2009, at 6:15 PM, E. Wing wrote:
Meanwhile, I patched the existing legacy bridge to be garbage
collection aware and fixed up some major memory leaks.
Dueling garbage collectors are generally a pain. On Lightroom, we
found it advantageous to be using the reference counted version of
Objective-C with Lua's garbage collector. Did you actually come up
with a reasonable way to handle the Lua object A points to Objective-C
object B which points to Lua object A case? In a simple dual GC
implementation (e.g., using refs or the equivalent to refer to Lua
objects), the objects end up as roots because of the foreign
references and the collectors end up waiting for the other to go first
in breaking the cycle. Lightroom uses the reference count information
to detect when the only reference to an Objective-C object is from the
Lua side and change its handling at that point.
Mark