summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2016-05-17 20:04:24 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2016-05-17 20:04:24 +0100
commit133033749100b037bafe1baee69fec1df5ba6c07 (patch)
tree27312fc635956d267efe1782ba1ea6878b737866 /Source
parent7ef1b04a86acf27b4a7304a576f106084f7f1405 (diff)
downloadswig-133033749100b037bafe1baee69fec1df5ba6c07.tar.gz
Revert introduction of minor memory leak in Ruby wrappers
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/ruby.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx
index 3ba816dee..2ed16b7d8 100644
--- a/Source/Modules/ruby.cxx
+++ b/Source/Modules/ruby.cxx
@@ -2136,7 +2136,11 @@ public:
String *protoTypes = NewString("");
do {
Append( protoTypes, "\n\" ");
- if ( !isCtor ) Printv( protoTypes, SwigType_str(Getattr(sibl,"type"), NULL), " ", NIL );
+ if (!isCtor) {
+ SwigType *type = SwigType_str(Getattr(sibl, "type"), NULL);
+ Printv(protoTypes, type, " ", NIL);
+ Delete(type);
+ }
Printv(protoTypes, methodName, NIL );
Parm* p = Getattr(sibl, "wrap:parms");
if (p && (current == MEMBER_FUNC || current == MEMBER_VAR ||