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:
parent
5f294a1404
commit
cad26e49fe
1 changed files with 2 additions and 5 deletions
|
|
@ -1440,7 +1440,7 @@ public:
|
||||||
// The type in the out attribute of the typemap overrides the type
|
// The type in the out attribute of the typemap overrides the type
|
||||||
// in the dtype typemap.
|
// in the dtype typemap.
|
||||||
tm = dtypeout;
|
tm = dtypeout;
|
||||||
replaceClassname(tm, t);
|
replaceClassname(tm, t);
|
||||||
}
|
}
|
||||||
Printf(return_type, "%s", tm);
|
Printf(return_type, "%s", tm);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2132,8 +2132,6 @@ public:
|
||||||
if (!ignored_method)
|
if (!ignored_method)
|
||||||
Printf(w->code, "%s\n", tm);
|
Printf(w->code, "%s\n", tm);
|
||||||
|
|
||||||
Delete(tm);
|
|
||||||
|
|
||||||
// Add parameter type to the C typedef for the D callback function.
|
// Add parameter type to the C typedef for the D callback function.
|
||||||
Printf(callback_typedef_parms, ", %s", c_param_type);
|
Printf(callback_typedef_parms, ", %s", c_param_type);
|
||||||
|
|
||||||
|
|
@ -2270,7 +2268,6 @@ public:
|
||||||
Printf(callback_code, " return %s;\n", tm);
|
Printf(callback_code, " return %s;\n", tm);
|
||||||
}
|
}
|
||||||
|
|
||||||
Delete(tm);
|
|
||||||
Delete(tp);
|
Delete(tp);
|
||||||
} else {
|
} else {
|
||||||
Printf(callback_code, " %s;\n", upcall);
|
Printf(callback_code, " %s;\n", upcall);
|
||||||
|
|
@ -3971,7 +3968,7 @@ private:
|
||||||
|
|
||||||
if (attached) {
|
if (attached) {
|
||||||
String *attr_name = NewStringf("tmap:%s", method);
|
String *attr_name = NewStringf("tmap:%s", method);
|
||||||
result = Getattr(n, attr_name);
|
result = Copy(Getattr(n, attr_name));
|
||||||
Delete(attr_name);
|
Delete(attr_name);
|
||||||
} else {
|
} else {
|
||||||
// FIXME: As a workaround for a bug so far only surfacing in the
|
// FIXME: As a workaround for a bug so far only surfacing in the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue