def clear(self):
        """
        Clears the context.
        """
        codec.Context.clear(self)

        self.strings.clear()
        self.proxied_objects = {}
        self.classes = {}
        self.class_ref = {}

        self.class_idx = 0