Click here to Skip to main content
12,063,452 members (73,061 online)
   

C#

 
AnswerRe: simple audio player in C# Pin
Pete O'Hanlon21-Feb-13 6:35
protectorPete O'Hanlon21-Feb-13 6:35 
GeneralRe: simple audio player in C# Pin
Chaman Saini21-Feb-13 6:50
memberChaman Saini21-Feb-13 6:50 
GeneralRe: simple audio player in C# Pin
Dave Kreskowiak21-Feb-13 7:04
mvpDave Kreskowiak21-Feb-13 7:04 
GeneralRe: simple audio player in C# Pin
Chaman Saini21-Feb-13 7:10
memberChaman Saini21-Feb-13 7:10 
GeneralRe: simple audio player in C# Pin
Chaman Saini21-Feb-13 7:14
memberChaman Saini21-Feb-13 7:14 
GeneralRe: simple audio player in C# Pin
Dave Kreskowiak21-Feb-13 13:32
mvpDave Kreskowiak21-Feb-13 13:32 
AnswerRe: simple audio player in C# Pin
Richard MacCutchan21-Feb-13 7:32
mvpRichard MacCutchan21-Feb-13 7:32 
QuestionC# WPF Memory Leak Pin
micwu20-Feb-13 22:54
membermicwu20-Feb-13 22: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.
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 23:30
mvpAbhinav S20-Feb-13 23:30 
AnswerRe: C# WPF Memory Leak Pin
Keith Barrow21-Feb-13 0:37
mentorKeith Barrow21-Feb-13 0:37 
AnswerRe: C# WPF Memory Leak Pin
Pete O'Hanlon21-Feb-13 0:46
protectorPete O'Hanlon21-Feb-13 0:46 
GeneralRe: C# WPF Memory Leak Pin
Wu Bin Michael21-Feb-13 16:03
memberWu Bin Michael21-Feb-13 16:03 
GeneralRe: C# WPF Memory Leak Pin
Pete O'Hanlon21-Feb-13 21:28
protectorPete O'Hanlon21-Feb-13 21:28 
AnswerRe: C# WPF Memory Leak Pin
Dave Kreskowiak21-Feb-13 3:28
mvpDave Kreskowiak21-Feb-13 3:28 
GeneralRe: C# WPF Memory Leak Pin
Wu Bin Michael21-Feb-13 15:54
memberWu Bin Michael21-Feb-13 15:54 
GeneralRe: C# WPF Memory Leak Pin
Dave Kreskowiak21-Feb-13 16:27
mvpDave Kreskowiak21-Feb-13 16:27 
AnswerRe: C# WPF Memory Leak Pin
V.21-Feb-13 4:47
memberV.21-Feb-13 4:47 
GeneralRe: C# WPF Memory Leak Pin
Wu Bin Michael21-Feb-13 15:51
memberWu Bin Michael21-Feb-13 15:51 
AnswerRe: C# WPF Memory Leak Pin
Bernhard Hiller21-Feb-13 22:05
memberBernhard Hiller21-Feb-13 22:05 
QuestionHttpwebrequest + Socks5 Pin
mathisderaltefuchs20-Feb-13 22:49
membermathisderaltefuchs20-Feb-13 22:49 
AnswerRe: Httpwebrequest + Socks5 Pin
Pete O'Hanlon21-Feb-13 3:30
protectorPete O'Hanlon21-Feb-13 3:30 
Questionimage resizing Pin
vimalbala20-Feb-13 19:51
membervimalbala20-Feb-13 19:51 
AnswerRe: image resizing Pin
Sandeep Mewara20-Feb-13 23:01
mvpSandeep Mewara20-Feb-13 23:01 
GeneralRe: image resizing Pin
vimalbala23-Mar-13 2:30
membervimalbala23-Mar-13 2:30 
QuestionC# Money Transfer Question Pin
Jimmy173420-Feb-13 19:10
memberJimmy173420-Feb-13 19: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.


Advertise | Privacy | Mobile
Web04 | 2.8.160204.4 | Last Updated 5 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid