Click here to Skip to main content
15,881,172 members
Home / Discussions / C#
   

C#

 
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 
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 
For the most part .net GC "just works" in .net, obviously this doesn't happen in all cases. It is rare to need to do an explicit GC. This[^] is probably worth a read. The most relevant part to this question is when GC takes place, to quote:


  • The system has low physical memory.
  • The memory that is used by allocated objects on the managed heap surpasses an acceptable threshold. This means that a threshold of acceptable memory usage has been exceeded on the managed heap. This threshold is continuously adjusted as the process runs.
  • The GC.Collect method is called. In almost all cases, you do not have to call this method, because the garbage collector runs continuously. This method is primarily used for unique situations and testing.

When one of these happens, GC takes place.

If you do something that takes up a lot of memory then it can be a good idea to GC, but it is generally discouraged. This is really a tuning thing and depends on your app, if the performance is degraded then you probably do need it.

Hope this answers your question.

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

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.