From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta05.westchester.pa.mail.comcast.net (qmta05.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:48]) by hurricane.the-brannons.com (Postfix) with ESMTP id 7C7B677AD7 for ; Mon, 6 Jan 2014 02:19:27 -0800 (PST) Received: from omta05.westchester.pa.mail.comcast.net ([76.96.62.43]) by qmta05.westchester.pa.mail.comcast.net with comcast id AaH51n0030vyq2s55aKE3h; Mon, 06 Jan 2014 10:19:14 +0000 Received: from eklhad ([107.5.36.150]) by omta05.westchester.pa.mail.comcast.net with comcast id AaKD1n0043EMmQj3RaKDwA; Mon, 06 Jan 2014 10:19:13 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.4.10 Date: Mon, 06 Jan 2014 05:19:13 -0500 Message-ID: <20140006051913.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1389003554; bh=yeJzhGDX3SQy468cKeKtB0CAPDx1o+5s/vOEkzXAhJU=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=c3xviEkumEAapKMybyB1mJhBDM+EyHr/3z9ZRbOmGhELfB4h97RdW5CXOI44Q43XM 1nX6Aonxlrle2CNThPV9xvkDtRLmBN3Fy/fzQ+84je75JiipAoXKXqGcbz7WnsmkLm uYVZOCpQvq05SPVYrHySSmRVR/ahwuzDb2kbl+MBlSCyGuX4DxdLmERDpCfjjDO6mr q/6jCwmyLZraHoGhcOtlGnBx+Kx1fo9sgFXVknR9V8EVsQPHR+sZoqhY4J3vw+HKHb V1/ib4As8NRyXxjbmWoOcFWClAD0hUlZ1LaaZr1lZ+FzzEaDmsRu6VXwXMED0lKpIp 0/CFojjTuCwaw== Subject: [Edbrowse-dev] window root X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Karl Dahlke List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jan 2014 10:19:27 -0000 > For example the JS_ValueToString function explicitly says > that you should protect its return value with a GC root or the string is > at risk of garbage collection at any stage. Well edbrowse is not multithreaded. Within the one and only thread, I immediately make that js value a property in some other object; I immediately link it to the window tree. That's why I made it a js string in the first place. Thus it is referenced. I keep thinking there should be no trouble. > Theoretically most of our objects should be protected from GC Theoretically all of our objects should be protected from GC, unless I did something wrong. > Admittedly some of this rooting may be paranoia, And that's ok, I guess, unless we are setting up excess reference counts, and those objects never go away, even when they aren't used any more, because the reference count never drops to 0, and edbrowse has memory leaks. People like me really are in edbrowse for hours at a time. So I'm not sure we should swing the big hammer and root everything. At an intellectual level I'd like to know why everything isn't already rooted to jswin. Of course you're doing all the work, not me, and if rooting everything will get us off the ground, and get rid of seg faults, then we can watch for and fix memory leaks later. I do understand that sometimes you just have to move forward. Karl Dahlke