SystemEvents.LowMemory 事件

定义

注意

This event has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202

注意

This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202

注意

The LowMemory event has been deprecated and is not supported.

当系统用完可用 RAM 时发生。

public:
 static event EventHandler ^ LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This event has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public static event EventHandler LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202")]
public static event EventHandler LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202")]
public static event EventHandler? LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("The LowMemory event has been deprecated and is not supported.")]
public static event EventHandler? LowMemory;
public static event EventHandler LowMemory;
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("This event has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.LowMemory : EventHandler 
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.LowMemory : EventHandler 
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("The LowMemory event has been deprecated and is not supported.")>]
member this.LowMemory : EventHandler 
member this.LowMemory : EventHandler 
Public Shared Custom Event LowMemory As EventHandler 

事件类型

属性

例外

当前上下文不支持系统事件通知。 例如,服务器进程可能不支持全局系统事件通知。

创建系统事件窗口线程的尝试未成功。

注解

此事件包装WM_COMPACTING消息。 当系统检测到超过 12.5% 的系统时间超过 30 到 60 秒的压缩内存时,此消息将发送到所有顶级窗口。 这指示系统内存不足。

注意

仅当消息泵正在运行时,才会引发此事件。 在 Windows 服务中,除非使用隐藏窗体或已手动启动消息泵,否则不会引发此事件。 有关演示如何使用 Windows 服务中的隐藏窗体处理系统事件的代码示例,请参阅 SystemEvents 类。

注意

由于这是静态事件,因此必须在释放应用程序时分离事件处理程序,否则会导致内存泄漏。

调用方说明

提供此消息只是为了与基于 Windows 的 16 位应用程序兼容。

适用于