* 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
This commit is contained in:
John (J5) Palmieri 2005-10-13 23:34:12 +00:00
parent 9cbcbb20ed
commit 7667a2ae4a
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2005-10-13 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-10-13 John (J5) Palmieri <johnp@redhat.com>
* python/service.py (ObjectType::_reflect_on_signal): Always close

View file

@ -130,9 +130,8 @@ class ObjectType(type):
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 @@ class ObjectType(type):
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