Click here to Skip to main content
15,900,907 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: convert WMI script Pin
Dave Kreskowiak10-Jan-06 4:34
mveDave Kreskowiak10-Jan-06 4:34 
GeneralRe: convert WMI script Pin
sentmemail10-Jan-06 4:42
sentmemail10-Jan-06 4:42 
GeneralRe: convert WMI script Pin
Dave Kreskowiak10-Jan-06 4:52
mveDave Kreskowiak10-Jan-06 4:52 
QuestionGarbage Collection In VB.Net Pin
kpr_psna9-Jan-06 18:28
kpr_psna9-Jan-06 18:28 
AnswerRe: Garbage Collection In VB.Net Pin
Steve Pullan9-Jan-06 19:27
Steve Pullan9-Jan-06 19:27 
GeneralRe: Garbage Collection In VB.Net Pin
Colin Angus Mackay9-Jan-06 21:01
Colin Angus Mackay9-Jan-06 21:01 
GeneralRe: Garbage Collection In VB.Net Pin
kpr_psna9-Jan-06 21:12
kpr_psna9-Jan-06 21:12 
GeneralRe: Garbage Collection In VB.Net Pin
Dave Kreskowiak10-Jan-06 4:08
mveDave Kreskowiak10-Jan-06 4:08 
kpr_psna wrote:
But after closing any sub form,and coming back to main billing form,the memory should get reduced.


Who said that? Really, no it won't. At least not to the Task Manager.

Task Manager is the worst tool you could use to see memory consumption in your .NET app.

Your .NET Managed Code (VB.NET, C#, Managed C++, ...) application runs in a managed envrionment, or virtual machine also known as the .NET Common Language Runtime (CLR). What the Task Manager is showing you is the unmanaged memory consumption of the entire virtual machine your app is running in, not just your code. These numbers will also include memory that has been reserved by the CLR, but not yet allocated to your code. This is called the Managed Heap.

When your app starts, the .NET Framework loads and starts up the CLR. The CLR sets up the execution environment and allocates a chunk of unmanaged memory from the system and creates the Managed Heap out of it. Your application is loaded into that heap where it starts to allocate memory for it's objects out of the Managed Heap. If the CLR starts to run out of Managed Heap space, it'll allocate more memory from the system and add it to the Managed Heap. The reverse is also true. If the system (Windows) starts running low on memory, the .NET CLR is responsible for freeing up unallocated memory in its Managed Heap and releasing it back to the system.

The entire Managed Heap is what you're seeing in Task Manager. If you want the actual numbers for your applications memory consumption, use the Performance Monitor and the .NET CLR performance counters.



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Garbage Collection In VB.Net Pin
Steve Pullan10-Jan-06 14:37
Steve Pullan10-Jan-06 14:37 
AnswerRe: Garbage Collection In VB.Net Pin
[Marc]9-Jan-06 19:37
[Marc]9-Jan-06 19:37 
GeneralRe: Garbage Collection In VB.Net Pin
Colin Angus Mackay9-Jan-06 21:03
Colin Angus Mackay9-Jan-06 21:03 
GeneralRe: Garbage Collection In VB.Net Pin
[Marc]10-Jan-06 9:00
[Marc]10-Jan-06 9:00 
GeneralRe: Garbage Collection In VB.Net Pin
kpr_psna9-Jan-06 21:13
kpr_psna9-Jan-06 21:13 
GeneralRe: Garbage Collection In VB.Net Pin
Colin Angus Mackay9-Jan-06 22:34
Colin Angus Mackay9-Jan-06 22:34 
GeneralRe: Garbage Collection In VB.Net Pin
kpr_psna10-Jan-06 0:12
kpr_psna10-Jan-06 0:12 
GeneralRe: Garbage Collection In VB.Net Pin
Dave Kreskowiak10-Jan-06 4:14
mveDave Kreskowiak10-Jan-06 4:14 
AnswerRe: Garbage Collection In VB.Net Pin
Guffa9-Jan-06 22:32
Guffa9-Jan-06 22:32 
GeneralRe: Garbage Collection In VB.Net Pin
kpr_psna10-Jan-06 0:13
kpr_psna10-Jan-06 0:13 
AnswerRe: Garbage Collection In VB.Net Pin
Guffa10-Jan-06 7:18
Guffa10-Jan-06 7:18 
QuestionUser Defined query Pin
Landon Spann9-Jan-06 11:40
Landon Spann9-Jan-06 11:40 
AnswerRe: User Defined query Pin
Dave Kreskowiak9-Jan-06 12:23
mveDave Kreskowiak9-Jan-06 12:23 
GeneralRe: User Defined query Pin
Colin Angus Mackay9-Jan-06 21:06
Colin Angus Mackay9-Jan-06 21:06 
GeneralRe: User Defined query Pin
Dave Kreskowiak10-Jan-06 2:57
mveDave Kreskowiak10-Jan-06 2:57 
GeneralRe: User Defined query Pin
Landon Spann10-Jan-06 4:00
Landon Spann10-Jan-06 4:00 
GeneralRe: User Defined query Pin
Dave Kreskowiak10-Jan-06 11:37
mveDave Kreskowiak10-Jan-06 11:37 

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.