in src/main/java/org/apache/sling/scripting/core/JakartaScriptHelper.java [281:293]
public void cleanup() {
if (this.references != null) {
final Iterator<ServiceReference<?>> i = this.references.iterator();
while (i.hasNext()) {
final ServiceReference<?> ref = i.next();
this.bundleContext.ungetService(ref);
}
this.references.clear();
}
if (this.services != null) {
this.services.clear();
}
}