public Trails GetTrails()
        {
            var result = new Trails();

            result.Allocate();
            GetTrailDataInternal(ref result);
            return(result);
        }
 public int GetTrails(ref Trails trailData)
 {
     trailData.Allocate();
     GetTrailDataInternal(ref trailData);
     return(trailData.positions.Count);
 }