Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: simple audio player in C# Pin
Pete O'Hanlon21-Feb-13 5:35
mvePete O'Hanlon21-Feb-13 5:35 
GeneralRe: simple audio player in C# Pin
Chaman Saini21-Feb-13 5:50
Chaman Saini21-Feb-13 5:50 
GeneralRe: simple audio player in C# Pin
Dave Kreskowiak21-Feb-13 6:04
mveDave Kreskowiak21-Feb-13 6:04 
GeneralRe: simple audio player in C# Pin
Chaman Saini21-Feb-13 6:10
Chaman Saini21-Feb-13 6:10 
GeneralRe: simple audio player in C# Pin
Chaman Saini21-Feb-13 6:14
Chaman Saini21-Feb-13 6:14 
GeneralRe: simple audio player in C# Pin
Dave Kreskowiak21-Feb-13 12:32
mveDave Kreskowiak21-Feb-13 12:32 
AnswerRe: simple audio player in C# Pin
Richard MacCutchan21-Feb-13 6:32
mveRichard MacCutchan21-Feb-13 6:32 
QuestionC# WPF Memory Leak Pin
Wu Bin Michael20-Feb-13 21:54
Wu Bin Michael20-Feb-13 21:54 
Recently, I had to track down why all of our new WPF screens were leaking memory. I rapidly dove into this issue and soon discovered that this issue was dispeared after I run the FOLLOWING code.
C#
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

Does .net not call the method?
I use the GC.CollectionCount method to get the number of times garbage collection has occurred for the 0/1/2 generation of objects and find they were 211/196/9.
It means .net Does do it.

Can somone tell me why it is occured?

PS: I have a test by open and closing 10+ screens, my app consumed 200+MB from task manager. According to the .net memory profiler and ANTS memory profiler, the objects created by my screens have been actually collected.
I also tested that if we forced a GC(Garbage Collector) collect by above codes, the memory will be reduced obviously.

Thanks,
Michael.
GC;Memory Leak


modified 21-Feb-13 21:08pm.

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 
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 

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.