> Hi 
> I use XPathEvaluator to create an XPath object using the createXPath 
api. I use
> the evaluate method and pass this xpath object for execution. i get the 
correct result.
> I try evaluating again with the same xpath object and i get assertion 
from
> xalanReferenceCountedObject saying m_recerenceCount should be 0. the 
result
> evaluated is correct, though.

Note that the documentation states:

        /**
         * Evaluate the supplied XPath expression, within the given 
context.  The
         * result is returned as a generalized object.  The object will be
         * destroyed when the returned when the user's copy of the 
returned
         * XObjectPtr goes out of scope, or when the XPathEvaluator goes 
out of scope
         * or another expression is evaluated.
         *
         * The user's XObjectPtr copy _must_ no longer be in scope when 
the XPathEvaluator
         * instance goes out of scope, or another expression is evaluated.

Note the last paragraph in particular.  I suspect you are keeping a copy 
of an XObjectPtr instance around from the previous evaluation.  If this 
doesn't cause your application to crash, you're lucky.

Dave

Reply via email to