remove many memory leaks and cleanup

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-11-29 01:47:10 +00:00
commit f714a2615d
21 changed files with 224 additions and 112 deletions

View file

@ -240,7 +240,9 @@ class TypePass : private Dispatcher {
Swig_symbol_setscope(s);
/* Recursively hit base classes */
String *newcast = NewStringf("(%s *)%s", SwigType_namestr(Getattr(bclass,"name")), cast);
String *namestr = SwigType_namestr(Getattr(bclass,"name"));
String *newcast = NewStringf("(%s *)%s", namestr, cast);
Delete(namestr);
cplus_inherit_types_impl(first,bclass,clsname,bases,baselist,ispublic,newcast);
Delete(newcast);
}
@ -434,6 +436,7 @@ class TypePass : private Dispatcher {
/* If in a namespace, patch the class name */
if (nname) {
Setattr(n,"name",nname);
Delete(nname);
}
return SWIG_OK;
}