[Sparkle] Plan to support garbage collection?
Pierre Bernard
pierre.bernard at houdah.com
Fri Feb 15 13:34:26 PST 2008
Hi all!
I am using Sparkle Plus in a GC application. It works just fine. The
problems must have been introduces some time after Sparkle Plus forked.
There are no special functions to call in order for GC to work. You
just need to keep ivars pointing at things you want to stick around.
Don't we always do that anyways? What would be the point of retaining
something and not a have a reference to it? It would be unreachable
and thus leaking.
I believe on can write "dual-mode" code pretty easily. No need to
fork. Leopard based developers will just need to flip the switch in
xCode.
Best,
Pierre Bernard
Houdah Software s.à r.l.
On 15 Feb 2008, at 22:13, Andy Matuschak wrote:
> 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
>
> _______________________________________________
> Sparkle mailing list
> Sparkle at lists.andymatuschak.org
> http://lists.andymatuschak.org/listinfo.cgi/sparkle-andymatuschak.org
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andymatuschak.org/pipermail/sparkle-andymatuschak.org/attachments/20080215/f07a93fc/attachment.htm
More information about the Sparkle
mailing list