Preempting __del__  hmmm
I need to preempt __del__ and I want to know what is the right way to do this.  Basically my question in code is this..

    class A:
        def __init__(self):
            self.log = logging.getLogger()
            self.log.debug("In init")
            self.closed = False
        
        def close(self):
            self.log.debug("Doing some magic")
            self.closed = True
            
        def __del__(self):
            if not self.closed:
                self.close()
            self.log.debug("In closing")
            
            # What should go here to properly do GC??
            
Is there any way to now call the standard GC features?

Thanks for reading!!

Steve

Preempting __del__  hmmm
===

I need to preempt __del__ and I want to know what is the right way to do this.  Basically my question in code is this..

    class A:
        def __init__(self):
            self.log = logging.getLogger()
            self.log.debug("In init")
            self.closed = False
        
        def close(self):
            self.log.debug("Doing some magic")
            self.closed = True
            
        def __del__(self):
            if not self.closed:
                self.close()
            self.log.debug("In closing")
            
            # What should go here to properly do GC??
            
Is there any way to now call the standard GC features?

Thanks for reading!!

Steve
