def remove_all(self, locator):
        """
        Removes all component references that match the specified locator.

        :param locator: a locator to remove reference by.

        :return: a list, containing all removed references.
        """
        components = []

        if locator == None:
            return components

        self._lock.acquire()
        try:
            for reference in reversed(self._references):
                if reference.match(locator):
                    self._references.remove(reference)
                    components.append(reference.get_component())
        finally:
            self._lock.release()
        
        return components
Removes all component references that match the specified locator.

        :param locator: a locator to remove reference by.

        :return: a list, containing all removed references.