Remove the mailbox from the host messenger after all data targets are done.
493314
private Runnable createCompletionTask(final Mailbox mb)
    {
        return new Runnable() {
            @Override
            public void run() {
                VoltDB.instance().getHostMessenger().removeMailbox(mb.getHSId());
            }
        };
    }
809982
def cleanup(self):
        """"""
        size = settings.get('history_size')
        self._save_history_to_file(self.commandprompthistory,
                                   self._cmd_hist_file, size=size)
        self._save_history_to_file(self.senderhistory, self._sender_hist_file,
                                   size=size)
        self._save_history_to_file(self.recipienthistory,
                                   self._recipients_hist_file, size=size)
338019
def remove_send_message(self, connection):
        
        if connection in self._send_message:
            del self._send_message[connection]
            LOGGER.debug("Removed send_message function "
                         "for connection %s", connection)
        else:
            LOGGER.warning("Attempted to remove send_message "
                           "function for connection %s, but no "
                           "send_message function was registered",
                           connection)
599247
def clean(self):
        

        EmailConfirmation.objects.filter(content_type=self.content_type, object_id=self.object_id, email_field_name=self.email_field_name).delete()
807214
function remove_message($mailbox = null, $uids = null)
    {
        if (!($this->mode & self::MODE_MESSAGE)) {
            return;
        }

        if (!strlen($mailbox)) {
            $this->db->query(
                "DELETE FROM {$this->messages_table}"
                ." WHERE `user_id` = ?",
                $this->userid);
        }
        else {
            // Remove the message from internal cache
            if (!empty($uids) && ($message = $this->icache['__message'])
                && $message['mailbox'] === $mailbox
                && in_array($message['object']->uid, (array)$uids)
            ) {
                $this->icache['__message'] = null;
            }

            $this->db->query(
                "DELETE FROM {$this->messages_table}"
                ." WHERE `user_id` = ?"
                    ." AND `mailbox` = ?"
                    .($uids !== null ? " AND `uid` IN (".$this->db->array2list((array)$uids, 'integer').")" : ""),
                $this->userid, $mailbox);
        }
    }
933514
protected void destroy() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Destroying these headers: " + this);
        }
        // if we have headers present, or reference parse buffers (i.e.
        // the first header parsed threw an error perhaps), then clear
        // the message now
        if (null != this.hdrSequence || HeaderStorage.NOTSET != this.parseIndex) {
            clear();
        }
        this.byteCacheSize = DEFAULT_CACHESIZE;
        this.incomingBufferSize = DEFAULT_BUFFERSIZE;
        this.outgoingHdrBufferSize = DEFAULT_BUFFERSIZE;
        this.useDirectBuffer = true;
        this.limitNumHeaders = DEFAULT_LIMIT_NUMHEADERS;
        this.limitTokenSize = DEFAULT_LIMIT_TOKENSIZE;
        this.headerChangeLimit = HeaderStorage.NOTSET;
    }
796825
public void clear() {
    messages = Collections.emptyList();
    isMessagesListMutable = false;
    if (builders != null) {
      for (SingleFieldBuilder<MType, BType, IType> entry :
          builders) {
        if (entry != null) {
          entry.dispose();
        }
      }
      builders = null;
    }
    onChanged();
    incrementModCounts();
  }
1117782
def _cleanup(self):
        '''
        
        '''
        self._ack_listener = None
        self._nack_listener = None
        self._broker_cancel_cb_map = None
        super(RabbitBasicClass, self)._cleanup()
425440
public function ClearAddresses() {
    foreach($this->to as $to) {
      unset($this->all_recipients[strtolower($to[0])]);
    }
    $this->to = array();
  }
1307543
def stopReceivingBoxes(self, reason):
        
        AMP.stopReceivingBoxes(self, reason)
        log.removeObserver(self._emit)
714253
void clearMsg(AppMsg appMsg) {
        if(msgQueue.contains(appMsg) || stickyQueue.contains(appMsg)){
            // Avoid the message from being removed twice.
            removeMessages(MESSAGE_DISPLAY, appMsg);
            removeMessages(MESSAGE_ADD_VIEW, appMsg);
            removeMessages(MESSAGE_REMOVE, appMsg);
            msgQueue.remove(appMsg);
            stickyQueue.remove(appMsg);
            removeMsg(appMsg);
        }
    }
380671
def remove(self, transport):
        
        if transport.uid in self.transports:
            del (self.transports[transport.uid])
429534
def remove(self, msg, callback):
        
        if callback is None:
            self._dict.pop(msg, None)
        else:
            cb = self._dict.get(msg, [])
            try:
                cb.remove(callback)
            except ValueError:
                pass
            if cb:
                _LOGGER.debug('%d callbacks for message: %s', len(cb), msg)
                self.add(msg, cb, True)
            else:
                self._dict.pop(msg, None)
                _LOGGER.debug('Removed all callbacks for message: %s', msg)
1221136
def purge(self):
        
        while not self.stopped.isSet():
            self.stopped.wait(timeout=defines.EXCHANGE_LIFETIME)
            self._messageLayer.purge()
623772
def remove_message(self, message, afterwards=None):
        
        if self.ro:
            raise DatabaseROError()
        path = message.get_filename()
        self.writequeue.append(('remove', afterwards, path))
642320
def clear(self):
        
        del self._statements_and_parameters[:]
        self.keyspace = None
        self.routing_key = None
        if self.custom_payload:
            self.custom_payload.clear()
980351
protected void cleanup() {

        final String methodName = "cleanup";
        if (TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        super.cleanup();

        if (_successfulMessages.size() > 0) {

            try {

                deleteMessages(getMessageHandles(_successfulMessages), null);

            } catch (final ResourceException exception) {

                FFDCFilter.processException(exception, CLASS_NAME + "."
                        + methodName, FFDC_PROBE_1, this);
                if (TRACE.isEventEnabled()) {
                    SibTr.exception(this, TRACE, exception);
                }

            } finally {

                _successfulMessages.clear();

            }

        }

        if (TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }