'Do we need to generate an implementation for the tp_clear slot? Can
be disabled to keep references for the __dealloc__ cleanup function.'

def needs_tp_clear(self):

    return (self.needs_gc() and (not self.directives.get('no_gc_clear', False)))
