Commits

Armin Rigo committed bd2699d Draft

Untested: fix the __del__ in module/oracle too.

  • Participants
  • Parent commits 0641fde

Comments (0)

Files changed (3)

pypy/module/oracle/interp_connect.py

         return space.wrap(self)
 
     def __del__(self):
+        self.enqueue_for_destruction(self.space, W_Connection.destructor,
+                                     '__del__ method of ')
+
+    def destructor(self):
+        assert isinstance(self, W_Connection)
         if self.release:
             roci.OCITransRollback(
                 self.handle, self.environment.errorHandle,

pypy/module/oracle/interp_object.py

         self.initialize(connection, param)
 
     def __del__(self):
+        self.enqueue_for_destruction(self.space, W_ObjectType.destructor,
+                                     '__del__ method of ')
+
+    def destructor(self):
+        assert isinstance(self, W_ObjectType)
         if self.tdo:
             roci.OCIObjectUnpin(
                 self.environment.handle,

pypy/module/oracle/interp_variable.py

         self.initialize(self.environment.space, cursor)
 
     def __del__(self):
+        self.enqueue_for_destruction(self.space, W_Variable.destructor,
+                                     '__del__ method of ')
+
+    def destructor(self):
+        assert isinstance(self, W_Variable)
         self.finalize()
         lltype.free(self.actualElementsPtr, flavor='raw')
         if self.actualLength: