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