# Pastebin WdnoShtU import random import sys class A(object): def __del__(self): pass class B(object): pass cls = {"A": A, "B": B}[sys.argv[1]] while True: # Gibberish to make sure the JIT doesn't optimize the allocation away [cls()] * random.randint(1, 1)