diff options
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 70957275b12..36b617e0b13 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -2742,6 +2742,8 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) bool nonmutating = find(metaData.begin(), metaData.end(), "nonmutating") != metaData.end(); out << nl << "IceInternal.Outgoing __out = new IceInternal.Outgoing(__connection, __reference, \"" << op->name() << "\", " << (nonmutating ? "true" : "false") << ", __context);"; + out << nl << "try"; + out << sb; if (!inParams.empty()) { out << nl << "IceInternal.BasicStream __os = __out.os();"; @@ -2824,6 +2826,12 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) } out << eb; + out << nl << "finally"; + out << sb; + out << nl << "__out.destroy();"; + out << eb; + + out << eb; } out << eb; |