def cleanup(self): for toon in list(self.toons): if toon in Avatar.ActiveAvatars: toon.removeActive() toon.delete() self.toons.remove(toon) for suit in list(self.suits): if suit in Avatar.ActiveAvatars: suit.removeActive() suit.delete() self.suits.remove(suit) Movie.cleanup(self)
def __init__(self): Movie.__init__(self) self.toons = set() self.suits = set()