Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 84761 invoked from network); 13 Dec 2000 16:53:09 -0000 Received: from the-gimp.canuck.com (HELO canuck.com) (204.50.15.12) by locus.apache.org with SMTP; 13 Dec 2000 16:53:09 -0000 Received: from [217.5.89.245] (pD90559F5.dip.t-dialin.net [217.5.89.245]) by canuck.com (8.9.3/8.9.3) with ESMTP id JAA5769636 for ; Wed, 13 Dec 2000 09:52:17 -0700 (MST) User-Agent: Microsoft Outlook Express Macintosh Edition - 5.01 (1630) Date: Wed, 13 Dec 2000 17:53:38 +0100 Subject: Re: [RT] Caching - SoftReference Annoyances at 3am From: Mark Washeim To: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N on 12/7/00 3:33 PM, Robin Green at greenrd@hotmail.com wrote: > "Robin Green" wrote: > > [snip] > >> But the point is, I can't see any way of reliably >> finding out when a reference has been cleared in order to remove it from >> the >> cache. > > Doh! Got it! > > Just set up a WeakReference and a SoftReference for each object. When the > SoftReference is cleared, the WeakReference will be added to its reference > queue. Simple really. > > I'll get right on it - I should have something usable to present Real Soon > Now. :-) > You're way, way too fast :) -- Mark (Poetaster) Washeim 'On the linen wrappings of certain mummified remains found near the Etrurian coast are invaluable writings that await translation. Quem colorem habet sapientia?' Evan S. Connell