Nexus.Client.Games.Morrowind.PluginManagement.Boss.StringArrayManualMarshaler.Dispose C# (CSharp) Method

Dispose() public method

Disposes of the pointers that were allocated during marshalling.
public Dispose ( ) : void
return void
		public void Dispose()
		{
			if (m_ptrStringArray != IntPtr.Zero)
			{
				for (Int32 i = 0; i < m_intArraySize; i++)
				{
					IntPtr ptrString = Marshal.ReadIntPtr(m_ptrStringArray, i * IntPtr.Size);
					Marshal.FreeHGlobal(ptrString);
				}
				Marshal.FreeHGlobal(m_ptrStringArray);
			}
		}