use of org.apache.axiom.core.InputContext in project webservices-axiom by apache.
the class TreeWalkerImpl method dispose.
@Override
public void dispose() {
if (!preserve && node != null) {
CoreParentNode parent = node instanceof CoreParentNode ? (CoreParentNode) node : ((CoreChildNode) node).coreGetParent();
while (true) {
InputContext context = parent.coreGetInputContext();
if (context != null) {
context.discard();
}
if (parent == root) {
break;
}
parent = ((CoreChildNode) parent).coreGetParent();
}
}
if (reader != null) {
reader.dispose();
}
}
Aggregations