You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add APIs previsouly in Native.Runtime assembly.
- Add `Collect` and `GetTotalMemory` to follow .NET API.
- `Run` is now private and used in both the new APIs.
- Improve IntelliSense comments.
- Rework GC unit tests to take advantage of the new APIs in GC.
- Add new Unit test to cover `GetTotalMemory`.
/// Suspends the current thread until the thread that is processing the queue of finalizers has emptied that queue.
32
+
/// Retrieves the heap size excluding fragmentation. For example if the total GC heap size is 1MB and fragmentation, ie, space taken up by free objects, takes up 400kB, this API would report 600kB. A parameter indicates whether this method can wait a short interval before returning, to allow the system to collect garbage and finalize objects.
/// <param name="forceFullCollection"><see langword="true"/> to indicate that this method can wait for garbage collection and heap compaction to occur before returning; otherwise, <see langword="false"/>.</param>
35
+
/// <returns>The heap size, in bytes, excluding fragmentation.</returns>
/// Forces an immediate garbage collection of all generations.
48
+
/// </summary>
49
+
/// <remarks>
50
+
/// Use this method to try to reclaim all memory that is inaccessible. It performs a blocking garbage collection of all generations.
51
+
/// All objects, regardless of how long they have been in memory, are considered for collection; however, objects that are referenced in managed code are not collected. Use this method to force the system to try to reclaim the maximum amount of available memory.
52
+
/// </remarks>
53
+
publicstaticvoidCollect()=>Run(true);
30
54
31
55
/// <summary>
32
-
/// Requests that the system call the finalizer for the specified object for which SuppressFinalize has previously been called.
56
+
/// Requests that the common language runtime not call the finalizer for the specified object.
33
57
/// </summary>
34
-
/// <param name="obj">The object that a finalizer must be called for. </param>
58
+
/// <param name="obj">The object whose finalizer must not be executed.</param>
59
+
/// <exception cref="ArgumentNullException"><paramref name="obj"/> is <see langword="null"/>.</exception>
0 commit comments