Memory​Manager Memory​Manager Memory​Manager Class

Definition

Provides access to information on an app's memory usage.

public static class MemoryManagerpublic static class MemoryManagerPublic Static Class MemoryManager
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

AppMemoryUsage AppMemoryUsage AppMemoryUsage

Gets the app's current memory usage.

public static ulong AppMemoryUsage { get; }public static ulong AppMemoryUsage { get; }Public Static ReadOnly Property AppMemoryUsage As ulong
Value
ulong ulong ulong

The app's current memory usage.

Attributes

AppMemoryUsageLevel AppMemoryUsageLevel AppMemoryUsageLevel

Gets the app's memory usage level.

public static AppMemoryUsageLevel AppMemoryUsageLevel { get; }public static AppMemoryUsageLevel AppMemoryUsageLevel { get; }Public Static ReadOnly Property AppMemoryUsageLevel As AppMemoryUsageLevel
Value
AppMemoryUsageLevel AppMemoryUsageLevel AppMemoryUsageLevel

The app's memory usage level.

Attributes

AppMemoryUsageLimit AppMemoryUsageLimit AppMemoryUsageLimit

Gets the app's memory usage limit.

public static ulong AppMemoryUsageLimit { get; }public static ulong AppMemoryUsageLimit { get; }Public Static ReadOnly Property AppMemoryUsageLimit As ulong
Value
ulong ulong ulong

The app's memory usage limit.

Attributes

Methods

GetAppMemoryReport() GetAppMemoryReport() GetAppMemoryReport()

Gets an AppMemoryReport for the app, which provides information about its memory usage.

public static AppMemoryReport GetAppMemoryReport()public static AppMemoryReport GetAppMemoryReport()Public Static Function GetAppMemoryReport() As AppMemoryReport
Returns

Information about the process' memory usage.

Attributes

GetProcessMemoryReport() GetProcessMemoryReport() GetProcessMemoryReport()

Gets a ProcessMemoryReport for a process, which provides information about its memory usage.

public static ProcessMemoryReport GetProcessMemoryReport()public static ProcessMemoryReport GetProcessMemoryReport()Public Static Function GetProcessMemoryReport() As ProcessMemoryReport
Returns

Information about the process' memory usage.

Attributes

TrySetAppMemoryUsageLimit(UInt64) TrySetAppMemoryUsageLimit(UInt64) TrySetAppMemoryUsageLimit(UInt64)

Tries to set a specific memory cap for the current app or task. In cases where memory caps are shared between foreground and background components, any difference between the default cap and the new request will be assigned to the other component.

public static PlatForm::Boolean TrySetAppMemoryUsageLimit(UInt64 value)public static bool TrySetAppMemoryUsageLimit(UInt64 value)Public Static Function TrySetAppMemoryUsageLimit(value As UInt64) As bool
Parameters
value
System.UInt64 System.UInt64 System.UInt64

The new memory limit to set.

Returns
bool bool bool

True if the operation succeeded; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Events

AppMemoryUsageDecreased AppMemoryUsageDecreased AppMemoryUsageDecreased

Raised when the app's memory consumption has decreased to a lower value in the AppMemoryUsageLevel enumeration.

public static event EventHandler AppMemoryUsageDecreasedpublic static event EventHandler AppMemoryUsageDecreasedPublic Static Event AppMemoryUsageDecreased
Attributes

AppMemoryUsageIncreased AppMemoryUsageIncreased AppMemoryUsageIncreased

Raised when the app's memory consumption has increased to a higher value in the AppMemoryUsageLevel enumeration.

public static event EventHandler AppMemoryUsageIncreasedpublic static event EventHandler AppMemoryUsageIncreasedPublic Static Event AppMemoryUsageIncreased
Attributes

AppMemoryUsageLimitChanging AppMemoryUsageLimitChanging AppMemoryUsageLimitChanging

Raised just before the limit of how much total memory the app can use is changed.

public static event EventHandler AppMemoryUsageLimitChangingpublic static event EventHandler AppMemoryUsageLimitChangingPublic Static Event AppMemoryUsageLimitChanging
Attributes