public void loadResources(String resourceString, boolean showLoadMessages, boolean optionalResources) {
        if (matchersHaveBeenInitialized) {
            throw new IllegalStateException("Refusing to load additional resources after the datastructures have been initialized.");
        }

        AnalyzerConfig extraConfig = new ConfigLoader(showLoadMessages)
            .addResource(resourceString, optionalResources)
            .load();

        addAnalyzerConfig(extraConfig);
        invalidateCaches();
        // FIXME: When a second set of resources are loaded then all already existing
        //        matchers are created again.
        //        So this can be rebuild of what has already been done. #SLOW!
        //        The only impact is at startup a few 100ms slower one-off.
        finalizeLoadingRules();
    }
In some cases it was found that simply dereferencing the instance and letting the GC clean it all up was "too hard".
To assist in these kinds of problem cases this method will wipe the internal data structures as much as possible.
After calling this method this instance becomes unusable and cannot be 'repaired'.
Normal applications will never need this. Simply dereferencing the analyzer will clean everything,
no memory leaks (that we know of).
analyzer/src/main/java/nl/basjes/parse/useragent/analyze/UserAgentStringMatchMaker.java