docs: void topicSpaceDeleted(DestinationHandler destination) throws SIResourceException
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "topicSpaceDeleted", destination);
  
      // Synchronize around the topic space references to stop removal and
      // additions occuring at the same time. 
      synchronized (_topicSpaces)
      {
        // Get the list of the different PubSubOutputHandlers from the Destination
        // Clone the list as the original is locked
        final HashMap pubsubOutputHandlers = (HashMap)(destination.getAllPubSubOutputHandlers()).clone();
        
        // Unlock the list as leaving it locked results in deadlock
        destination.unlockPubsubOutputHandlers();
  
        // Check that there are some output handlers as they may have all been 
        // removed or none have ever been created on this topicSpace destination
        if (pubsubOutputHandlers != null && pubsubOutputHandlers.size() > 0)
        {
          final ArrayList topicSpacesDeleted = new ArrayList();
          final ArrayList topicsDeleted = new ArrayList();
  
          // Get the set of keys from the pubsubOutputHandlers which is infact the
          // list of meNames
          final Iterator neighbourUuids = pubsubOutputHandlers.keySet().iterator();
  
          // Iterate over the list of meNames
          while (neighbourUuids.hasNext())
          {
            // Reset the created topicSpaces
            topicSpacesDeleted.clear();
  
            // Reset the created topics
            topicsDeleted.clear();
  
            // Get the next me Name
            final SIBUuid8 neighbourUuid = (SIBUuid8) neighbourUuids.next();
  
            // Get the PubSubOutputHandler associated with this ME.
            final PubSubOutputHandler handler =
              (PubSubOutputHandler) pubsubOutputHandlers.get(neighbourUuid);
  
            final String topics[] = handler.getTopics();
            
            Neighbour neighbour = getNeighbour(neighbourUuid);
            
            // In the case that this neighbour is recovered, but not activated,
            // this neighbour should be got from the recovered list
            boolean warmRestarted = false;
            if (neighbour == null)
            {          
              synchronized(_recoveredNeighbours)
              {
                neighbour = (Neighbour)_recoveredNeighbours.get(neighbourUuid);
              }
              warmRestarted = true;
            } 
            
            // Cycle through the topics removing each one from this ME.
            // but only if there are topics to remove.
            if ( neighbour != null && topics != null)
            {
              for (int i = 0; i < topics.length; i++)
              {              
                // Remove this Handler from the MatchSpace 
                if (!warmRestarted)
                {
                  MESubscription meSub = neighbour.getSubscription(destination.getUuid(), topics[i]);
                
                  ControllableProxySubscription sub = meSub.getMatchspaceSub();              
                  _proxyHandler
                    .getMessageProcessor()
                    .getMessageProcessorMatching()
                    .removePubSubOutputHandlerMatchTarget(sub);
                    
                  destination.getSubscriptionIndex().remove(sub);
                }  
                
                // Remove the topic from the referenced topics in the handler.
                handler.removeTopic(topics[i]);
    
                // Add a reference into the reference list so when a delete arrives
                // The proxy can be removed.
                addTopicSpaceReference(neighbourUuid, destination.getUuid(), topics[i], warmRestarted);
    
                // Add the topicSpace and topic to the set of deleted topics.
                topicSpacesDeleted.add(destination.getUuid());
                topicsDeleted.add(topics[i]);
              }
            }
            
            // Having cleaned all the topics out from the handler
            // delete the handler.
            destination.deletePubSubOutputHandler(neighbourUuid);                                        
            
            
            // Publish the deleted event for the deleted topics on the topic space
            if ( neighbour!= null )
              _proxyHandler.unsubscribeEvent(
                topicSpacesDeleted,
                topicsDeleted,
                neighbour.getBusId(),
                null);
          }
        }
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "topicSpaceDeleted");
    }