[Sparkle] Plan to support garbage collection?

Andy Matuschak 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  
sure.

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:

> Hi
>
> 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
> -fobjc-gc-only"
>
> 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[1]. 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.
>
> Dave
>
> [1] - 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
>> again?
>>
>> - Andy Matuschak
>>
>>
>> On Feb 13, 2008, at 6:11 AM, Dave Verwer wrote:
>>
>>> Hi
>>>
>>> I tried compiling trunk with GC supported but there were a couple of
>>> errors, are there any plans to support it any time soon?
>>>
>>> Cheers
>>> Dave
>>>
>>>
>>> --
>>> 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
>>> http://lists.andymatuschak.org/listinfo.cgi/sparkle- 
>>> andymatuschak.org
>>
>> _______________________________________________
>> Sparkle mailing list
>> Sparkle at lists.andymatuschak.org
>> http://lists.andymatuschak.org/listinfo.cgi/sparkle-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
> http://lists.andymatuschak.org/listinfo.cgi/sparkle-andymatuschak.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andymatuschak.org/pipermail/sparkle-andymatuschak.org/attachments/20080215/b409040c/attachment.htm>


More information about the Sparkle mailing list