Click here to Skip to main content
15,893,622 members
Home / Discussions / C#
   

C#

 
GeneralRe: Drawing an arc Pin
subramanyeswari13-Sep-05 0:53
subramanyeswari13-Sep-05 0:53 
QuestionTabIndex of multiple usercontrols Pin
JorisFromHolland11-Sep-05 23:08
JorisFromHolland11-Sep-05 23:08 
AnswerRe: TabIndex of multiple usercontrols Pin
LeenaSo12-Sep-05 0:13
LeenaSo12-Sep-05 0:13 
Question'Specified cast is not valid' Pin
Member 183980011-Sep-05 23:07
Member 183980011-Sep-05 23:07 
QuestionC# Memory Leak Mystery Pin
Jason Pease11-Sep-05 22:37
Jason Pease11-Sep-05 22:37 
AnswerRe: C# Memory Leak Mystery Pin
Zdeslav Vojkovic12-Sep-05 1:12
Zdeslav Vojkovic12-Sep-05 1:12 
AnswerRe: C# Memory Leak Mystery Pin
Guffa12-Sep-05 1:29
Guffa12-Sep-05 1:29 
AnswerRe: C# Memory Leak Mystery Pin
S. Senthil Kumar12-Sep-05 4:15
S. Senthil Kumar12-Sep-05 4:15 
First off, how did you make the GC run? GC.Collect? That's not enough. You need to do
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();


Jason Pease wrote:
If I create a loop that calls a dummy function that does nothing

That's because the JIT compiler generates native code the first time a function is called and that code obviously takes up some space. If you'd noticed it carefully, you'd have seen that memory consumption doesn't keep rising, it just stays at that point. Nothing short of shutting down the process will reclaim that memory for you.


Jason Pease wrote:
The problem becomes much more significant when I create an instance of a System.Data.SqlClient.SqlConnection and open it. After opening the connection, closing it,

IIRC, the underlying connection is not closed and the managed SqlConnection object is simply pooled, so obviously it can't be garbage collected.


Jason Pease wrote:
I'm left with about 185K of memory

How did you measure? Task Manager? You should be using Perfmon with "#Bytes in All Heaps" counter to get an accurate picture of the size of the GC heap.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: C# Memory Leak Mystery Pin
Jason Pease12-Sep-05 6:15
Jason Pease12-Sep-05 6:15 
GeneralRe: C# Memory Leak Mystery Pin
S. Senthil Kumar12-Sep-05 15:09
S. Senthil Kumar12-Sep-05 15:09 
QuestionCopy directories Pin
Stefan_ Spenz11-Sep-05 22:13
Stefan_ Spenz11-Sep-05 22:13 
AnswerRe: Copy directories Pin
rakesh_nits11-Sep-05 22:34
rakesh_nits11-Sep-05 22:34 
Questionmonitoring directories Pin
rakesh_nits11-Sep-05 21:51
rakesh_nits11-Sep-05 21:51 
AnswerRe: monitoring directories Pin
Dave Kreskowiak12-Sep-05 5:44
mveDave Kreskowiak12-Sep-05 5:44 
QuestionDrawing an arc Pin
11-Sep-05 21:08
suss11-Sep-05 21:08 
QuestionMail Recieve Notification Pin
mail2bourne11-Sep-05 20:34
mail2bourne11-Sep-05 20:34 
AnswerRe: Mail Recieve Notification Pin
S. Senthil Kumar11-Sep-05 21:09
S. Senthil Kumar11-Sep-05 21:09 
Questionsystem.threading.timer Pin
dhol11-Sep-05 20:02
dhol11-Sep-05 20:02 
AnswerRe: system.threading.timer Pin
g00fyman11-Sep-05 20:29
g00fyman11-Sep-05 20:29 
AnswerRe: system.threading.timer Pin
S. Senthil Kumar11-Sep-05 21:07
S. Senthil Kumar11-Sep-05 21:07 
GeneralRe: system.threading.timer Pin
dhol12-Sep-05 2:25
dhol12-Sep-05 2:25 
Questiontrapping dockpadding changes Pin
microsoc11-Sep-05 19:58
microsoc11-Sep-05 19:58 
AnswerRe: trapping dockpadding changes Pin
leppie11-Sep-05 21:14
leppie11-Sep-05 21:14 
AnswerRe: trapping dockpadding changes Pin
leppie11-Sep-05 21:19
leppie11-Sep-05 21:19 
QuestionRe: trapping dockpadding changes Pin
microsoc11-Sep-05 21:39
microsoc11-Sep-05 21:39 

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.