Fix use of deleted memory in D module

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13556 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-08-08 06:06:31 +00:00
commit cad26e49fe

View file

@ -1440,7 +1440,7 @@ public:
// The type in the out attribute of the typemap overrides the type
// in the dtype typemap.
tm = dtypeout;
replaceClassname(tm, t);
replaceClassname(tm, t);
}
Printf(return_type, "%s", tm);
} else {
@ -2132,8 +2132,6 @@ public:
if (!ignored_method)
Printf(w->code, "%s\n", tm);
Delete(tm);
// Add parameter type to the C typedef for the D callback function.
Printf(callback_typedef_parms, ", %s", c_param_type);
@ -2270,7 +2268,6 @@ public:
Printf(callback_code, " return %s;\n", tm);
}
Delete(tm);
Delete(tp);
} else {
Printf(callback_code, " %s;\n", upcall);
@ -3971,7 +3968,7 @@ private:
if (attached) {
String *attr_name = NewStringf("tmap:%s", method);
result = Getattr(n, attr_name);
result = Copy(Getattr(n, attr_name));
Delete(attr_name);
} else {
// FIXME: As a workaround for a bug so far only surfacing in the