src/main/java/org/apache/sling/scripting/core/ScriptHelper.java [271:283]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    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();
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



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();
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



