abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: Extensions
Date Mon, 30 Oct 2006 02:09:28 GMT
Yeah, I was toying around with the idea of using a WeakHashMap inside
ExtensionFactoryMap.  That should be enough to avoid the potential leak
issue.  The other alternative would be to tie ExtensionFactoryMap to the
Document rather than to the Factory, but even that runs into a number of
potential issues.

- James

Garrett Rooney wrote:
> [snip]
> One thing that makes me pause as I read over the actual diff is the
> ExtensionFactoryMap stuff.  It's storing the mapping between elements
> and their wrapper class, so when we have an underlying OMElement
> instance we can go back to the wrapper object and pass that back to
> the user.  Ok, that seems like a fine solution, but I wonder if we're
> going to be setting ourselves up for memory leaks by storing
> references to all the wrapper elements a factory creates in that map.
> Should this be using some sort of weak reference type thing here to
> avoid that?
> 
> In general though, I'm very +1 on this, and if the patch is done (and
> the extensions converted) I'd love to get it in before our proposed
> release.
> 
> -garrett
> 

Mime
View raw message