[Sparkle] Plan to support garbage collection?
andy at andymatuschak.org
Fri Feb 15 13:13:25 PST 2008
Oops! Okay, so it turns out this is really hard—I didn't understand
before. To make a proper "dual-mode" framework (that is, one that runs
linked to both garbage-collected and traditionally-managed binaries),
you have to both maintain proper retain counts for all objects in the
system and maintain strong links to anything you want to keep track of.
Sparkle doesn't really do the latter for a number of things, so these
objects (like the appcast, and some of the dialogs) would need to be
kept as ivars of the SUUpdater for this to work properly.
Even if that work were done, though, the problem is a little more
complicated because only the 10.5 SDK has the necessary functions
(objc_ivar_assign and friends) to make GC-supported work correctly.
But Sparkle supports 10.3 on. So how do we make this work? Separate
versions of the framework for 10.3+ and 10.5-gc-only? I'm not totally
Does anyone have any experience with creating dual-mode frameworks
that run on pre-Leopard?
- Andy Matuschak
On Feb 14, 2008, at 3:46 AM, Dave Verwer wrote:
> I have tried this again but unfortunately it does not seem to have
> done the trick. I checked the latest trunk out and compiled it
> successfully but when including that framework in my app I still get
> told that Sparkle.framework "was not compiled with -fobjc-gc or
> I opened up the Sparkle xcodeproj and checked the options, when I
> check the GC options for the Sparkle framework target it says
> "Multiple Values" which is strange as I am not sure how you can have
> multiple values for one target.
> Switching the GC options to "Supported" for the framework, I get the
> original errors I was getting yesterday. It seems to be complaining
> about _objc_assign_ivar and _objc_assign_global being used. This is
> not referenced anywhere in the source, I am hitting a dead end really
> as I am fairly new to Cocoa and ObjC.
>  - http://pastie.caboo.se/152117
> On 2/13/08, Andy Matuschak <andy at andymatuschak.org> wrote:
>> I just tried turning on gc-supported, and it recompiled with no
>> warnings or errors. I committed the change to trunk; give it a try
>> - Andy Matuschak
>> On Feb 13, 2008, at 6:11 AM, Dave Verwer wrote:
>>> I tried compiling trunk with GC supported but there were a couple of
>>> errors, are there any plans to support it any time soon?
>>> e-mail: dave.verwer at shinydevelopment.com
>>> web: http://shinydevelopment.com
>>> Shiny Development Ltd. is registered in England, Registration
>>> 05805802. Registered Office: 4 Claridge Court, Lower Kings Road,
>>> Berkhamsted, Herts., HP4 2AF.
>>> Sparkle mailing list
>>> Sparkle at lists.andymatuschak.org
>> Sparkle mailing list
>> Sparkle at lists.andymatuschak.org
> e-mail: dave.verwer at shinydevelopment.com
> web: http://shinydevelopment.com
> Shiny Development Ltd. is registered in England, Registration Number:
> 05805802. Registered Office: 4 Claridge Court, Lower Kings Road,
> Berkhamsted, Herts., HP4 2AF.
> Sparkle mailing list
> Sparkle at lists.andymatuschak.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sparkle