code: def free_memory(cls, exclude=None):
          
  
          annotations_in_memory = Annotation.__ANNOTATIONS_IN_MEMORY__
  
          exclude = () if exclude is None else exclude
  
          for annotation_cls in list(annotations_in_memory.keys()):
  
              if issubclass(annotation_cls, exclude):
                  continue
  
              if issubclass(annotation_cls, cls):
                  del annotations_in_memory[annotation_cls]
docs: Free global annotation memory.