I'm actually aware of this and the fix is going to be in the next
release. The patch involves replacing three methods in
jess/TokenVector.java with new versions:
final void clear() {
if (m_ptr > 0) {
Arrays.fill(m_v, 0, m_ptr, null);
m_ptr = 0;
}
}
final void removeElementAt(int i)
{
m_v[i] = m_v[m_ptr-1];
m_v[--m_ptr] = null;
}
final void removeElement(Token t)
{
for (int i=0; i<m_ptr; i++)
if (t.dataEquals(m_v[i]))
{
removeElementAt(i);
return;
}
}
I think Ian de Beer wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi
> We noticed when running a profiler on our application that even though we
> retract / undefinstance facts that are no longer used, jess retains a
> reference to those facts, therefore preventing the garbage collector from
> releasing heap space. This cause our application to steadily outgrow
> available memory.
> Is there a way of clearing old references from defrules while running Jess
> in run-unit-halt mode - _reset_ seems to be an obvious way to do just that,
> but when is an opportune time to that, if you are constantly asserting new
> facts?
> Regards
> Ian
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------