fix memory leaking

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7859 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-11-21 20:58:31 +00:00
commit af0aab45d7

View file

@ -47,9 +47,9 @@
} }
PyObject *obj = PyDict_New(); PyObject *obj = PyDict_New();
for (const_iterator i= map.begin(); i!= map.end(); ++i) { for (const_iterator i= map.begin(); i!= map.end(); ++i) {
PyDict_SetItem(obj, swig::PyObject_var key = swig::from(i->first);
swig::from(i->first), swig::PyObject_var val = swig::from(i->second);
swig::from(i->second)); PyDict_SetItem(obj, key, val);
} }
return obj; return obj;
} }