Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# WPF Memory Leak Pin
Abhinav S20-Feb-13 22:30
Abhinav S20-Feb-13 22:30 
AnswerRe: C# WPF Memory Leak Pin
Keith Barrow20-Feb-13 23:37
professionalKeith Barrow20-Feb-13 23:37 
AnswerRe: C# WPF Memory Leak Pin
Pete O'Hanlon20-Feb-13 23:46
mvePete O'Hanlon20-Feb-13 23:46 
GeneralRe: C# WPF Memory Leak Pin
Wu Bin Michael21-Feb-13 15:03
Wu Bin Michael21-Feb-13 15:03 
GeneralRe: C# WPF Memory Leak Pin
Pete O'Hanlon21-Feb-13 20:28
mvePete O'Hanlon21-Feb-13 20:28 
AnswerRe: C# WPF Memory Leak Pin
Dave Kreskowiak21-Feb-13 2:28
mveDave Kreskowiak21-Feb-13 2:28 
GeneralRe: C# WPF Memory Leak Pin
Wu Bin Michael21-Feb-13 14:54
Wu Bin Michael21-Feb-13 14:54 
GeneralRe: C# WPF Memory Leak Pin
Dave Kreskowiak21-Feb-13 15:27
mveDave Kreskowiak21-Feb-13 15:27 
If Windows wants the memory back, the .NET CLR is more than happy to collect and return as much as it can. The GC will also run whenever it gets a sense that it "can" and/or needs to. It's, really, very good at its job. You can see an example of this just by watching the Task Manager and launching your app, then minimizing it.

The CLR will try to keep a pool of memory (managed heaps) available for your apps object allocations. Objects that are collected get the memory returned back to the managed heap, NOT to Windows. This keeps allocation speeds fast compared to allocating a block of memory from Windows, adding it to the heap, and then allocating your object. If the memory is already in the heap, there's no round-trip to Windows to get the memory first.

What Task Manager is showing you is how much memory is RESERVED by the .NET CLR for your app, not how much your app is actually using. But, like I said, if Windows needs the memory back for any reason, the .NET CLR is more than happy to give as much back as it can. You really don't need to worry about what you see in Task Manager. It's not representative of what your app is actually doing and should not be used to generate your applications system requirements.

AnswerRe: C# WPF Memory Leak Pin
V.21-Feb-13 3:47
professionalV.21-Feb-13 3:47 
GeneralRe: C# WPF Memory Leak Pin
Wu Bin Michael21-Feb-13 14:51
Wu Bin Michael21-Feb-13 14:51 
AnswerRe: C# WPF Memory Leak Pin
Bernhard Hiller21-Feb-13 21:05
Bernhard Hiller21-Feb-13 21:05 
QuestionHttpwebrequest + Socks5 Pin
mathisderaltefuchs20-Feb-13 21:49
mathisderaltefuchs20-Feb-13 21:49 
AnswerRe: Httpwebrequest + Socks5 Pin
Pete O'Hanlon21-Feb-13 2:30
mvePete O'Hanlon21-Feb-13 2:30 
Questionimage resizing Pin
vimalbala20-Feb-13 18:51
vimalbala20-Feb-13 18:51 
AnswerRe: image resizing Pin
Sandeep Mewara20-Feb-13 22:01
mveSandeep Mewara20-Feb-13 22:01 
GeneralRe: image resizing Pin
vimalbala23-Mar-13 1:30
vimalbala23-Mar-13 1:30 
QuestionC# Money Transfer Question Pin
Jimmy173420-Feb-13 18:10
Jimmy173420-Feb-13 18:10 
QuestionRe: C# Money Transfer Question Pin
Eddy Vluggen21-Feb-13 8:40
professionalEddy Vluggen21-Feb-13 8:40 
QuestionMD5 hash encrypt and decryption Pin
thekoko8920-Feb-13 15:32
thekoko8920-Feb-13 15:32 
GeneralRe: MD5 hash encrypt and decryption Pin
PIEBALDconsult20-Feb-13 17:18
mvePIEBALDconsult20-Feb-13 17:18 
AnswerRe: MD5 hash encrypt and decryption Pin
Bernhard Hiller20-Feb-13 21:12
Bernhard Hiller20-Feb-13 21:12 
AnswerRe: MD5 hash encrypt and decryption Pin
Dave Kreskowiak21-Feb-13 2:34
mveDave Kreskowiak21-Feb-13 2:34 
QuestionPost a file to remote server using HTTPWEBREQUEST Pin
vanikanc20-Feb-13 9:07
vanikanc20-Feb-13 9:07 
AnswerRe: Post a file to remote server using HTTPWEBREQUEST Pin
Eddy Vluggen20-Feb-13 9:51
professionalEddy Vluggen20-Feb-13 9:51 
GeneralRe: Post a file to remote server using HTTPWEBREQUEST Pin
vanikanc20-Feb-13 10:04
vanikanc20-Feb-13 10:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.