Exemple #1
0
        public T At(int index)
        {
            IntPtr   valptr = AivVectorNative.At(Handle, (uint)index);
            GCHandle handle = GCHandle.FromIntPtr(valptr);

            return((T)handle.Target);
        }
Exemple #2
0
        public void Dispose()
        {
            if (Handle == IntPtr.Zero)
            {
                return;
            }

            for (uint i = 0; i < Count(); i++)
            {
                IntPtr valptr = AivVectorNative.At(Handle, i);
                GCHandle.FromIntPtr(valptr).Free();
            }
            AivVectorNative.Destroy(Handle);
            Handle = IntPtr.Zero;

            GC.SuppressFinalize(this);
        }