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)]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics2, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics, 65536, Windows.Foundation.UniversalApiContract)]
class MemoryManager abstract final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics3, 131072, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics2, 65536, "Windows.Foundation.UniversalApiContract")]
class MemoryManager abstract final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics3, 131072, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics2, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.IMemoryManagerStatics4, 327680, "Windows.Foundation.UniversalApiContract")]
class MemoryManager abstract final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics2), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
public static class MemoryManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics3), 131072, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics2), 65536, "Windows.Foundation.UniversalApiContract")]
public static class MemoryManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics3), 131072, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics2), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IMemoryManagerStatics4), 327680, "Windows.Foundation.UniversalApiContract")]
public static class MemoryManager
Public Class MemoryManager
- Inheritance
-
MemoryManager
- Attributes
Windows 10 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. |