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 E237611FA7 for ; Tue, 17 Jun 2014 18:03:25 +0000 (UTC) Received: (qmail 7452 invoked by uid 500); 17 Jun 2014 18:03:25 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 7406 invoked by uid 500); 17 Jun 2014 18:03:25 -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 7394 invoked by uid 99); 17 Jun 2014 18:03:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2014 18:03:25 +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 (athena.apache.org: domain of purplecabbage@gmail.com designates 209.85.128.171 as permitted sender) Received: from [209.85.128.171] (HELO mail-ve0-f171.google.com) (209.85.128.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2014 18:03:21 +0000 Received: by mail-ve0-f171.google.com with SMTP id jz11so8092702veb.30 for ; Tue, 17 Jun 2014 11:03:00 -0700 (PDT) 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=mxIpc9BVwEAJSEVvKyhAHzeSqbwSDNq5ttbIaH+KezQ=; b=qFO/vNDghy0x9frYKDPmC9VVAxR4+u0Qbp9pYFDc9AMTC/nDHbgpkcbQvymQhEW1NY czrtMLgKnjOvKAZEDU6g6He/Ke1kB9tfOIyuD9KYlRvMcVsNLAwA0QknDjXI1tMKsqKY CFCAGuy2qr56v+63uVq9pGJkQV+LCFINSJBfU1a8T7N1sbKiYx/a0RR7BVcZT1RFZIk7 kyxSv3oy8J1ALh5kegNdGYfe0PrivNFLVI9jgqniXEFmx5BQBzEfJBUzmMaIZEJZN4eu nx+jxDGno2KQkBNq/RqkzS5mkaG7f5qpOHsmZqFEgYYPLuyVlX4PmA1IxBxt5Kmg/tSM 8cEA== MIME-Version: 1.0 X-Received: by 10.221.20.199 with SMTP id qp7mr11963699vcb.24.1403028179970; Tue, 17 Jun 2014 11:02:59 -0700 (PDT) Received: by 10.58.197.97 with HTTP; Tue, 17 Jun 2014 11:02:59 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Jun 2014 11:02:59 -0700 Message-ID: Subject: Re: WP8 memory leak From: Jesse To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a11339e2e46f33404fc0bf45f X-Virus-Checked: Checked by ClamAV on apache.org --001a11339e2e46f33404fc0bf45f Content-Type: text/plain; charset=UTF-8 Thanks Staci, This was a use-case I didn't spend a lot of time on. @purplecabbage risingj.com On Tue, Jun 17, 2014 at 10:49 AM, Staci Cooper wrote: > The memory leak was caused by event listeners for PhoneApplicationService. > I unwired them in CordovaBrowser_Unloaded (pull request: > https://github.com/apache/cordova-wp8/pull/41). It fixes the leak but I > want to make sure it doesn't go against the intended behavior. > > > On Tue, Jun 17, 2014 at 11:58 AM, Staci Cooper > wrote: > > > Hey, > > > > I'm looking into CB-6924 >, > > where I'm seeing a memory leak in WP8 when navigating back and forth > from a > > native to a hybrid page. A new page is being created every time you > > navigate to the Cordova page, and none of them are garbage collected. > > > > Is this the intended behavior? When a new page is constructed, a new > > CordovaView is being created with it. The CordovaView has a bool called > > 'IsBrowserInitialized' > > < > https://github.com/apache/cordova-wp8/blob/master/wp8/template/cordovalib/CordovaView.xaml.cs#L43 > >which, > > according to the comment, "prevents data clearing during page > transitions". > > It is set to true in CordovaBrowser_Loaded, or causes the handler to > return > > if it is already set to true. I'm not sure if 'page transitions' refers > to > > transitions within the CordovaBrowser or at a higher level. > > > --001a11339e2e46f33404fc0bf45f--