Mita community #18 Memory Leaks
-
Upload
yuriy-seniuk -
Category
Education
-
view
371 -
download
3
description
Transcript of Mita community #18 Memory Leaks
Memory Leaks
Yuriy Seniuk
Memory in .NET
• Stack
• Managed Heap
• Unmanaged Heap
Memory Leaks
• OutOfMemoryEcxeption
• Slow Execution
• Increasing of Memory Usage
How to detect leaks?
Memory Leaks
• StackOverflowException
Invocation of methods which needs large memory resources
Cyclic/Deep Invocation
• Leaks in Thread’s stack
Leaks in Stack Memory
Memory Leaks
• Invocation of unmanaged code
• Errors in finalize methods
• Dynamic creation of an assembly in memory
• XmlSerializer
Leaks in Unmanaged Heap
Memory Leaks
• Fragmentation of Large Memory Heap
• Root links
Events
Static Fields
• Midlife crisis
Leaks in Managed Heap
Memory Leaks
http://msdn.microsoft.com/ru-ru/magazine/cc163491.aspx
http://msdn.microsoft.com/library/ee787088.aspx
http://stackoverflow.com/questions/11711867/extremely-large-
objects-and-managed-heap-in-c-sharp
Used resources
Memory Leaks
Q/A
Thanks you all