[jboss-jira] [JBoss JIRA] Created: (JBRULES-1444) Potential "smal" memory leak

Yves Galante (JIRA) jira-events at lists.jboss.org
Wed Jan 30 16:46:59 EST 2008


Potential "smal" memory leak
----------------------------

                 Key: JBRULES-1444
                 URL: http://jira.jboss.com/jira/browse/JBRULES-1444
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Reteoo
    Affects Versions: 4.0.4, FUTURE
            Reporter: Yves Galante


Class VariableContextEntry and ReturnValueContextEntry are instantiated when Package.addRule called.
"Package rules" like there class..

        "Package => ... =>  VariableContextEntry

But class have a reference  to the InternalWorkingMemory !

        "Package => ... => VariableContextEntry => Workingmemory"

When test case is executed "testExemple32", at the end of the execution, WorkingMemory need to be garbage collected, but it isn't because she is referenced by ReturnValueContextEntry and/or VariableContextEntry, and this class keeps an reference to the WorkingMemory.

I think this can be generate an "smal" memory leak.

This memory leak generated is not "infinity", the maximum size of this memory leak is "~ size(WorkingMemory + Facts)  x  number rules on the rules base".

It is right ?
The membre workingMemory can't be removed from VariableContextEntry/ReturnValueContextEntry ?
I have make a patch with this, all junit test (core, compiler) has been passed.

ps:

The patch remove membre workingMemory.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list