MemoryManager Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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. |