code: public boolean removeSubscriber(Handler handler) {
          String handlerId = CollectorManagerUtils.getHandlerId(handler);
          subscribers.remove(handlerId);
          /*
           * Inform the handler that this source/buffer will no longer be available:
           * Synchronous Handler: Remove the synchronous handler from the Buffer/Conduit's sync handler set
           * Asynchronous Handler: Remove the asynchronous handler from the the Buffer/Conduit
           */
          if (handler instanceof SynchronousHandler) {
              bufferMgr.removeSyncHandler((SynchronousHandler) handler);
          } else {
              bufferMgr.removeHandler(handlerId);
          }
  
          if (subscribers.isEmpty()) {
  
              /*
               * Can not set bufferMgr to null (in here or in the source )if this SrcMgr belongs
               * to LogSource or TraceSource
               */
              if (!sourceId.contains(CollectorConstants.MESSAGES_SOURCE) && !sourceId.contains(CollectorConstants.TRACE_SOURCE)) {
                  /*
                   * Last subscriber, unassign the buffer
                   * Inform the source that buffer will no longer be available
                   * and it should stop sending events to this buffer.
                   */
                  source.unsetBufferManager(bufferMgr);
                  bufferMgr = null;
              }
              return true;
          }
          return false;
      }
docs: Method to remove a subscriber from the source
  Source manager deallocate BufferManager when last subscriber goes away
  
  @param handler The handler that is to be removed as subscriber
  @return a boolean to indicate whether last subscriber has been removed, true for yes false for no