What is the correct way to use Add/RemoveMemoryPressure for unmanaged objects? I have an unmanaged object- but it makes heavy use of, e.g., STL containers. Am I supposed to constantly update the managed GC with every change to the total size of the unmanaged object? Or just it’s raw allocation size? And when do I call RemoveMemoryPressure? Finalizer? Dispose()?
What is the correct way to use Add/RemoveMemoryPressure for unmanaged objects? I have an
Share
From here (and noted by @Wim Coenen):
So you have to decide how much effort to put into tracking these changes and how much benefit you will get.