From 97569890f896c75088922f97f81f50a4f6321e6a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 5 Aug 2011 14:43:34 -0500 Subject: [PATCH] [svn-r21175] Release datatypes created locally --- hl/c++/test/ptableTest.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp index 9c48f7733f..929058dd76 100644 --- a/hl/c++/test/ptableTest.cpp +++ b/hl/c++/test/ptableTest.cpp @@ -74,6 +74,7 @@ int main(void) return -1; } + int BasicTest() { herr_t err; @@ -182,9 +183,17 @@ int TestCompoundDatatype() goto out; PASSED(); + + H5Tclose(dtypeID); return 0; out: + + H5E_BEGIN_TRY { + H5Tclose(dtypeID); + } H5E_END_TRY; + + H5_FAILED(); return 1; } @@ -514,10 +523,19 @@ int SystemTest() if(ct1[1].b != ct2[2].g.b) goto out; + H5Tclose(dtypeID1); + H5Tclose(dtypeID2); + PASSED(); return 0; out: + + H5E_BEGIN_TRY { + H5Tclose(dtypeID1); + H5Tclose(dtypeID2); + } H5E_END_TRY; + H5_FAILED(); return 1; }