public static void DestroySharedMemory(IntPtr handle) { if (OperatingSystem.IsWindows()) { MemoryManagementWindows.DestroySharedMemory(handle); } else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()) { MemoryManagementUnix.DestroySharedMemory(handle); } else { throw new PlatformNotSupportedException(); } }
public static void DestroySharedMemory(IntPtr handle) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { MemoryManagementWindows.DestroySharedMemory(handle); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { MemoryManagementUnix.DestroySharedMemory(handle); } else { throw new PlatformNotSupportedException(); } }