@Override
    public void destroy() {
        for (ProviderConfig providerConfig : providerInstances.keySet()) {
            unRegister(providerConfig);
        }
        for (ConsumerConfig consumerConfig : consumerListeners.keySet()) {
            unSubscribe(consumerConfig);
        }
        namingService = null;
        providerObserver = null;
    }
Instantiates a new Nacos registry.

@param registryConfig the registry config
registry/registry-nacos/src/main/java/com/alipay/sofa/rpc/registry/nacos/NacosRegistry.java