Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54018 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19306 invoked from network); 18 Jul 2011 07:33:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2011 07:33:58 -0000 Authentication-Results: pb1.pair.com header.from=landeholm@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=landeholm@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: landeholm@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:62570] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/21-08769-5E1E32E4 for ; Mon, 18 Jul 2011 03:33:58 -0400 Received: by iwn36 with SMTP id 36so3061119iwn.29 for ; Mon, 18 Jul 2011 00:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SrDAE2LxPx7TZUAU1cHZAd1+eX5a6JaRV/UbsiD5krM=; b=nTLf1LtOt/OtuguWcQLl0tFcUOtc1OhYSSrsBea8N99Mt40K2IH3SUt3gJpSwnNheO kxQGqkEi9bsRpVcoTMTqUixX1px4j1P3qnSvgPB+F6YJW7tYgtwAjN814Mwnh6UOa3ai LIhKj6Hud/nKPvRifjdh95fBEPdokE+1funtU= MIME-Version: 1.0 Received: by 10.231.83.8 with SMTP id d8mr5401317ibl.97.1310974435139; Mon, 18 Jul 2011 00:33:55 -0700 (PDT) Received: by 10.231.37.11 with HTTP; Mon, 18 Jul 2011 00:33:51 -0700 (PDT) In-Reply-To: <4E23D124.50104@toolpark.com> References: <4E22DDD0.20105@toolpark.com> <4E23D124.50104@toolpark.com> Date: Mon, 18 Jul 2011 09:33:51 +0200 Message-ID: To: Lars Schultz , internals@lists.php.net Content-Type: multipart/alternative; boundary=000e0cd4a65e84225e04a8530504 Subject: Re: [PHP-DEV] weak references From: landeholm@gmail.com (Hannes Landeholm) --000e0cd4a65e84225e04a8530504 Content-Type: text/plain; charset=ISO-8859-1 Lars: Please don't break up my sentences and take them out of context before you reply to them. (Hint: If a sentence begins with "so" it's not a good idea to just reply to that sentence.) If you are caching stuff you would rather want to use a strong reference since the objects should be retained between "usages" _per definition_. You might exploit weak references + destructor resurrection to achieve some kind of on-demand, unorthodox caching mechanism but that would not be a primary use cache for weak references, nor what you suggested (deallocate objects when OOM is reached). I have also given an example of how weak references is not necessarily used for caching, therefore not directly related to it. If you want to continue to discuss "on demand deallocation", I suggest that you start a separate thread. I hope this will be more clear once the RFC is complete. I will then start a separate thread for official discussion. ~Hannes --000e0cd4a65e84225e04a8530504--