Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Joshua Cranmer Newsgroups: comp.lang.java.programmer Subject: Re: Managed-Code Bloat Date: Mon, 06 Jun 2011 17:44:51 -0700 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 7 Jun 2011 00:44:56 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="Q8HyEFb0j2lB0WC1MU3ArQ"; logging-data="2665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KswdlJ23AtQT9PrzAnv1gERaFT+4+qwA=" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:bkShVjOFAGC8nCA1kKTPYZEbZTY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5045 On 6/6/2011 5:06 PM, Lawrence D'Oliveiro wrote: > I think JavaScript uses reference-counting, too. Why else would it have a > “delete” statement Both SpiderMonkey and V8 are garbage-collected. Don't believe me? Here is their garbage collector: (I don't actually work with V8, so I don't know it's class layout so well). If you want more evidence, the ECMAScript committee talks about some JS things in the context of garbage collection: . As for python, Python does have a garbage collector because it is very easy to accidentally create cycles in references, the big bane of reference-counted systems. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth