From 133033749100b037bafe1baee69fec1df5ba6c07 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 17 May 2016 20:04:24 +0100 Subject: Revert introduction of minor memory leak in Ruby wrappers --- Source/Modules/ruby.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Source') 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 || -- cgit v1.2.1