Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A65C4E308 for ; Fri, 11 Jan 2013 18:35:17 +0000 (UTC) Received: (qmail 88192 invoked by uid 500); 11 Jan 2013 18:35:17 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 88160 invoked by uid 500); 11 Jan 2013 18:35:17 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 88152 invoked by uid 99); 11 Jan 2013 18:35:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 18:35:17 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shazron@gmail.com designates 209.85.216.42 as permitted sender) Received: from [209.85.216.42] (HELO mail-qa0-f42.google.com) (209.85.216.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 18:35:11 +0000 Received: by mail-qa0-f42.google.com with SMTP id hg5so51416qab.15 for ; Fri, 11 Jan 2013 10:34:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lF/u4dogPJOzzZLN2AKwSECZjBjJRFHzuiGF4TTPp60=; b=T13Seo1eNFsuw+1MDe3KM9oDyt6p0J8f+sluhNEhEQCUbP6HylQ25FvV8E7oOtMlUD n0mz+HLfs6NLY58QgY743dCU8j//Z0xwFEVi/ClBZBNVykxNUFA/WvepFFu0PsqCU02W Y5AryLaZCaTcvj3/gr6w0rCqoB8XVdAiI1fbNKNgtjWuJ0tnbNCzAU/Qe6Dxev6DLt8N oEz/Mc2NGEUpTBx/dhKxu/RImbHxyJvHENcEqhRc0ucHHCxZwJv+GzdUh1CGmk3vWOJR alw5HnTUuLc0FfXzQYjWtxaiISoCNaLd2g0iQ96tq5SaRvIjzqzTAA7V2oFmZ6QyCriQ ZoFA== MIME-Version: 1.0 Received: by 10.224.78.82 with SMTP id j18mr50245242qak.69.1357929290655; Fri, 11 Jan 2013 10:34:50 -0800 (PST) Received: by 10.49.15.196 with HTTP; Fri, 11 Jan 2013 10:34:50 -0800 (PST) In-Reply-To: <15115FEB-FF42-4D28-9AB2-69ECC5DE2264@gmail.com> References: <15115FEB-FF42-4D28-9AB2-69ECC5DE2264@gmail.com> Date: Fri, 11 Jan 2013 10:34:50 -0800 Message-ID: Subject: Re: Should Automatic Reference Counting be on? From: Shazron To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=20cf3074b250ffe75e04d3078cac X-Virus-Checked: Checked by ClamAV on apache.org --20cf3074b250ffe75e04d3078cac Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Actually Cordova core has been ARC for a couple of releases now. Good idea for the plugin tool default to non-ARC, this should be covered in the spec... On Friday, January 11, 2013, Kerri Shotts wrote: > My two cents: > > If it's feasible to support ARC, I'd go for it. Having worked with ARC an= d > non-ARC code, ARC is definitely easier on my brain cells -- I'm far too > likely to leak memory like a sieve with manual memory management=85 > > That said, converting Cordova's base code from non-ARC to ARC may not be > trivial. In theory, you can just get rid of autoreleases, retains, > deallocs, and handle properties (assign/retain/copy --> weak,strong), but > sometimes you end up getting into toll-free bridging between Cocoa and Co= re > Foundation, and occasionally you run into more obscure problems (such as > ARC releasing the object before the code expected it. Easy to fix, but no= t > always /obvious/ prior to experiencing the issue.) > > Once we have ARC support, though, the -fno-objc-arc compiler flag is a > per-file setting, so I would think that the plugin tools could set that > flag based on whether or not the plugin supported ARC or not. (I would > think this should be determined in the metadata somewhere? Perhaps > defaulting to no-ARC if there's no metadata saying one way or the other?) > > > On Jan 11, 2013, at 9:14 AM, Andrew Grieve > > wrote: > > > This caught me off-guard as well, and I filed an issue to fix it up: > > https://issues.apache.org/jira/browse/CB-2180 > > > > I don't think it'll be entirely straight-forward though, because some > > plugins still do not support ARC. > > > > What are everyone's thoughts on how to address this? One option is to > have > > the default project template already set-up with two lib targets. One f= or > > ARC and one without ARC. Another option is to instruct users how to set > the > > compile flag to disable arc on a per-file basis. > > > > Do we want to support ARC and non-ARC plugins in plugman? > > > > > > On Thu, Jan 10, 2013 at 6:52 PM, Jacob Weber > > wrote: > > > >> When I create a new iOS project with Cordova 2.3, Automatic Reference > >> Counting (CLANG_ENABLE_OBJC_ARC) is turned off. And the code (e.g. > >> AppDelegate.m) uses autorelease, which I'm pretty sure is incompatible > with > >> ARC. > >> > >> Is this correct? Based on this blog post, I thought it should be on: > >> > >> > http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-counti= ng-arc-and-cordova-plugins/ > >> > >> Jacob > > --20cf3074b250ffe75e04d3078cac--