HDF5DotNet Variable-Length String Attributes

Hello, I’m currently using HDF5DotNet library version 1.8.9 x86 to read a HDF5 file with x number attributes with a structure of an integer and a variable-length string. I manage to get the data out, but I’m uncertain whether the structure that I’m reading the attribute into is managed or unmanaged. Is this the correct way to load the data to .Net?

using HDF5DotNet;
namespace CommonClass
{
        public class HDF5FileReader
        {
             public static List<string> HDF5GetSubGroups(string filePath)
             {
                  var returnList = new List<string>();
                  //... some HDF5 instantiating -- commented out for brevity
                  var myStruct = new MyStruct[numberOfAttributes];
                  H5A.read(someAttribute, someAttributeType, new H5Array<MyStruct>(myStruct));
                  string myStructVariableString = IntPtrToString(myStruct[0].intPtr);
                  returnList.Add(myStructVariableString);
                  //... closing some HDF5 instantiating -- commented out for brevity
                  return returnList
             }

         private string IntPtrToString(IntPtr ipp)
         {
              string s = Marshal.PtrToStringAnsi(ipp)
              //need to free ipp?
              return s;
         }
     }

     public struct MyStruct
     {
          public Int int1;
          public IntPtr intPtr;
     }
}

namespace CallerClass
{
     public class SomeCallerClass()
     {
         string someFilePath = "Path\To\HDF5File.h5"
         var stringList = HDF5FileReader.HDF5GetSubGroups(someFilePath)
         //Do Something with StringList -- add to observablecollection
     }

     public class UnloadingSomeCallerClass()
     {
          //Clear the observablecollection
     }

}