Aracılığıyla paylaş


MemoryManager Class

Definition

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

public ref class MemoryManager abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class MemoryManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class MemoryManager
Public Class MemoryManager
Inheritance
Object Platform::Object IInspectable MemoryManager
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Version history

Windows version SDK version Value added
1511 10586 TrySetAppMemoryUsageLimit
1709 16299 ExpectedAppMemoryUsageLimit

Properties

AppMemoryUsage

Gets the app's current memory usage.

AppMemoryUsageLevel

Gets the app's memory usage level.

AppMemoryUsageLimit

Gets the app's memory usage limit.

ExpectedAppMemoryUsageLimit

Gets the amount of memory that your app may expect to have available.

Methods

GetAppMemoryReport()

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

GetProcessMemoryReport()

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

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.

Events

AppMemoryUsageDecreased

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

AppMemoryUsageIncreased

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

AppMemoryUsageLimitChanging

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

Applies to