C # Performance AddMemoryPressure

Does the C # AddMemoryPressure call use a connection to the specific object for which it is called? I saw how this manifested itself in our performance trails, and I want them to collect calls every 10 MB or so, but if he checks the stack to attach pressure information to a specific object, which, in his opinion, stands out then t work

+5
source share
2 answers

AddMemoryPressure only tells the GC that it uses more memory than what is visible to the GC. It is not associated with any object.

AddMemoryPressure, , , , , . , , -, .

, , . " , , AddMemoryPressure RemoveMemoryPressure ".

, , .

+2

RemoveMemoryPressure, , .

(, ) , . , , . , AddMemoryPressure, , OutOfMemory. , !

0

All Articles