I have used them in two ways in practical application.
A rather odd but quite interesting use case is short lived caches. Consider
a recursive static function such as the Fibonacci sequence. You could hold a
cache of the previous computations and allow them to be collected at the
GC's leisure.
An
that purpose without create a
memory leak.
Allen
> -Original Message-
> From: es-discuss-boun...@mozilla.org [mailto:es-discuss-
> boun...@mozilla.org] On Behalf Of P T Withington
> Sent: Friday, October 29, 2010 8:34 AM
> To: Peter van der Zee
> Cc: es-discuss
> S
On 2010-10-29, at 04:50, Peter van der Zee wrote:
> What's the use case for weak maps? What would you do with it that currently
> impossible and why is the workaround (if any) problematic enough to warrant
> a weak map implementation?
Another use case was mentioned in the "New topic regarding Pro
On 10/29/10 4:50 AM, Peter van der Zee wrote:
What's the use case for weak maps? What would you do with it that
currently impossible and why is the workaround (if any) problematic
enough to warrant a weak map implementation?
One case this came up recently was for Firebug, Firebug wants to cach
What's the use case for weak maps? What would you do with it that currently
impossible and why is the workaround (if any) problematic enough to warrant
a weak map implementation?
There's been quite a bit of discussion because of it. Especially in the area
of covert channels and garbage collection.
5 matches
Mail list logo