in src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java [334:351]
protected void deactivate(ComponentContext context) {
writeLock.lock();
try {
// remove the root scope
dropRootScope();
// remove our context factory
SlingContextFactory.teardown();
// remove references
wrapFactory = null;
hostObjectProvider.clear();
active = false;
} finally {
writeLock.unlock();
}
}