You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Enrico Triolo <en...@gmail.com> on 2006/07/13 13:29:02 UTC

Re: Possible memory leak?

I'm trying to fix this bug, so I looked at some source code to see how
other objects are cached in the configuration.
I see for example in CommonGrams.java that an Hashtable is put into
the configuration using the setObject() method. Could I use the same
method? Can I put arbitrary objects in the configuration or must they
implement/extend some interface/class (maybe Serializable?).

Enrico

On 6/28/06, Enrico Triolo <en...@gmail.com> wrote:
> Sure!
>
> On 6/28/06, Jérôme Charron <je...@gmail.com> wrote:
> > It seems to be a side effect of NUTCH-169 (remove static NutchConf).
> > Prior to this, the language identifier was a singleton.
> > I think we should cache its instance in the conf as we do for many others
> > objects
> > in Nutch.
> > Enrico, could you please create a JIRA issue.
> >
> > Thanks
> >
> > Jérôme
> >
> > --
> > http://motrech.free.fr/
> > http://www.frutch.org/
> >
> >
>

Re: Possible memory leak?

Posted by Sami Siren <ss...@gmail.com>.
You do not need to implement any special interface any object will do.
--
 Sami Siren

Enrico Triolo wrote:

> I'm trying to fix this bug, so I looked at some source code to see how
> other objects are cached in the configuration.
> I see for example in CommonGrams.java that an Hashtable is put into
> the configuration using the setObject() method. Could I use the same
> method? Can I put arbitrary objects in the configuration or must they
> implement/extend some interface/class (maybe Serializable?).
>
> Enrico
>
> On 6/28/06, Enrico Triolo <en...@gmail.com> wrote:
>
>> Sure!
>>
>> On 6/28/06, Jérôme Charron <je...@gmail.com> wrote:
>> > It seems to be a side effect of NUTCH-169 (remove static NutchConf).
>> > Prior to this, the language identifier was a singleton.
>> > I think we should cache its instance in the conf as we do for many 
>> others
>> > objects
>> > in Nutch.
>> > Enrico, could you please create a JIRA issue.
>> >
>> > Thanks
>> >
>> > Jérôme
>> >
>> > --
>> > http://motrech.free.fr/
>> > http://www.frutch.org/
>> >
>> >
>>
>