def free_up_memory(self):
        """Free memory by removing all text objects."""
        ### clear character objects from each line
        for line in self.lines:
            line.clear()

        ### then clear the lines themselves
        self.lines.clear()
Free memory by removing all text objects.
nodezator/textman/editor/cursor/op.py