1 # -*- coding: iso-8859-1 -*-
4 When imported this module adds to CORBA objref from GenericObj type
5 automatic management of reference count
6 The reference count is incremented when the local proxy is created (assignment of __omni_obj attribute)
7 and is decremented when the local proxy is deleted (call of __del__)
9 The GenericObj class for proxy is modified by adding two methods : __del__ and __setattr__
10 The module must be imported before any other import of SALOME CORBA module
17 omniORB.CORBA.Object.__del__(self)
19 def mysetattr(self,attr,value):
20 self.__dict__[attr]=value
21 if attr == "__omni_obj":
24 SALOME._objref_GenericObj.__del__=mydel
25 SALOME._objref_GenericObj.__setattr__=mysetattr