commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <skitch...@apache.org>
Subject Re: [digester] Digester pinning objects in memory
Date Wed, 06 Jul 2005 00:12:49 GMT
On Tue, 2005-07-05 at 16:48 -0500, Matt Goodwin wrote:
> I am using commons-digester for creating some objects from some xml 
> files.  When I look at this with JProbe Digester (and some other 
> internal stuff are still referencing the object that is parsed.  The 
> code is as follows, any help would be greatly appreciated: 

Digester does keep a reference to the "root" object it creates. You can
clear this via a call to:
  Digester.resetRoot (since 1.7 only).

I don't see any other way that Digester could retain references to
created objects.

However this shouldn't be relevant; after you use the Digester object,
there shouldn't be any references to it. So the Digester will get
garbage-collected and therefore the "root" object isn't prevented from
being garbage-collected. It would therefore appear that your code is
holding on to the Digester reference after it has been used; if you fix
this then your problem should go away anyway.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message