Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53975 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53623 invoked from network); 15 Jul 2011 20:18:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2011 20:18:34 -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.210.170 as permitted sender) X-PHP-List-Original-Sender: landeholm@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:41742] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 73/F3-17341-990A02E4 for ; Fri, 15 Jul 2011 16:18:33 -0400 Received: by iym1 with SMTP id 1so1578081iym.29 for ; Fri, 15 Jul 2011 13:18:31 -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=epMsTep9QMwEJIgo/s/KI5AxtAssyY7VSh6W+k/qJ7M=; b=XbgEKW7cClxJfBFeZXLgtAxny9WJPgUn0nRtAas/4QbNnFMrIsUJOxVFhy4YZGhX/f rHhA89srcmJBGcXnx728VAgLE4r+W0kyD46oyj262ORfMqaXOoiwk7SXuAkdQjCf2le6 sB5uTvlDHb5ezFX9z9EeD8g2ohei0x5yewo7w= MIME-Version: 1.0 Received: by 10.231.91.77 with SMTP id l13mr3444244ibm.44.1310761111542; Fri, 15 Jul 2011 13:18:31 -0700 (PDT) Received: by 10.231.34.65 with HTTP; Fri, 15 Jul 2011 13:18:31 -0700 (PDT) In-Reply-To: References: Date: Fri, 15 Jul 2011 22:18:31 +0200 Message-ID: To: Etienne Kneuss , internals@lists.php.net Content-Type: multipart/alternative; boundary=bcaec5395ede705bf004a8215ac9 Subject: Re: [PHP-DEV] weak references From: landeholm@gmail.com (Hannes Landeholm) --bcaec5395ede705bf004a8215ac9 Content-Type: text/plain; charset=ISO-8859-1 Hi, Ferenc: Good idea to move the discussion to a separate thread. Etienne: Awesome. I wish I had time to write the patch myself. I could probably put some hours into adding more details to the RFC though. The only problem as I see it by making it a weak reference class instead of a weak reference collection is that you would end up with a bunch of unnecessary indexes in the array that points to invalid references. The simplest solution to this problem if you still want to implement it as you have begun to is to allow catching the cleanup event in a callback so you can manually unset the index. Should I add these concerns to the RFC? Thanks a bunch, Hannes --bcaec5395ede705bf004a8215ac9--