smartcaveman / runsharp-google-export

Automatically exported from code.google.com/p/runsharp
MIT License
0 stars 0 forks source link

Exception in CacheEntry finalizer #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the process of running the rule generation driven by runsharp for 30000 
rules, I got an exception when the CacheEntry finalizer executed.  The item was 
already removed from the internal cache.  I got around the exception by first 
checking if the item is still located in the cache as illustrated below:

~CacheEntry()
{
    lock (cache)
    {
        if (cache.ContainsKey(t) && (cache[t].Target == this || cache[t].Target == null))
            cache.Remove(t);
    }
}

Original issue reported on code.google.com by carel.l...@gmail.com on 21 Aug 2010 at 2:51

GoogleCodeExporter commented 9 years ago
Hi,

this bug has already been reported (Issue 12), with the same proposed fix :)

Shame on me for not integrating this months ago.

Regards,
Stefan

Original comment by StefanSi...@gmail.com on 22 Aug 2010 at 8:57