dbus/python service.py,1.8,1.9

John Palmieri johnp at freedesktop.org
Thu Oct 13 16:34:14 PDT 2005


Update of /cvs/dbus/dbus/python
In directory gabe:/tmp/cvs-serv21102/python

Modified Files:
	service.py 
Log Message:
* python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method): 	
reclaim memory outside of the loop and use del istead of just setting
the key to None


Index: service.py
===================================================================
RCS file: /cvs/dbus/dbus/python/service.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- service.py	13 Oct 2005 23:26:00 -0000	1.8
+++ service.py	13 Oct 2005 23:34:12 -0000	1.9
@@ -130,9 +130,8 @@
         for arg in func._dbus_args:
             reflection_data = reflection_data + '      <arg name="%s" type="v" />\n'%(arg)
 
-            #reclaim some memory
-            func._dbus_args = None
-	    
+        #reclaim some memory
+        del func._dbus_args
         reflection_data = reflection_data + '    </method>\n'
 
         return reflection_data  
@@ -141,8 +140,9 @@
         reflection_data = '    <signal name="%s">\n'%(func.__name__)
         for arg in func._dbus_args:
             reflection_data = reflection_data + '      <arg name="%s" type="v" />\n'%(arg)
-            #reclaim some memory
-            func._dbus_args = None
+	    
+        #reclaim some memory
+        del func._dbus_args
         reflection_data = reflection_data + '    </signal>\n'
 
         return reflection_data



More information about the dbus-commit mailing list