摘要 |
Described is a technology in a managed code/native code framework in which native code monitors memory usage (e.g., every fifty frames) to determine when memory usage has increased beyond a threshold. If so, the native memory requests that the managed code perform a garbage collection operation. The managed code may only perform the garbage collection when a sufficient number of objects are ready to be collected. The native code requests additional garbage collection passes be performed in a loop until the managed code decides not to further perform garbage collection, e.g., when not enough objects remain or the number to be collected does not change between collection passes. |