Click here to Skip to main content
15,891,649 members
Home / Discussions / C#
   

C#

 
GeneralRe: Accessing properties as an array Pin
Heath Stewart17-Feb-04 5:11
protectorHeath Stewart17-Feb-04 5:11 
GeneralRe: Accessing properties as an array Pin
OmegaSupreme17-Feb-04 0:46
OmegaSupreme17-Feb-04 0:46 
GeneralRe: Accessing properties as an array Pin
Jonathan de Halleux17-Feb-04 1:15
Jonathan de Halleux17-Feb-04 1:15 
GeneralRe: Accessing properties as an array Pin
OmegaSupreme17-Feb-04 1:46
OmegaSupreme17-Feb-04 1:46 
GeneralRe: Accessing properties as an array Pin
Omega50117-Feb-04 9:34
Omega50117-Feb-04 9:34 
GeneralRe: Accessing properties as an array Pin
OmegaSupreme17-Feb-04 12:43
OmegaSupreme17-Feb-04 12:43 
Generalapplication uses all the memory Pin
amadeonMk16-Feb-04 21:23
amadeonMk16-Feb-04 21:23 
GeneralRe: application uses all the memory Pin
Heath Stewart17-Feb-04 5:20
protectorHeath Stewart17-Feb-04 5:20 
Of course the .NET Framework is loaded before your app! What do you think managed your managed code? This is a runtime, just like Java required a JRE, VB requires the VB Virtual Machine (VM), etc. The CLR will take a few megs but the assemblies that are loaded into your application will take as much space as required to execute the code. The CLR JIT's only what is linked as it executes code, so it all isn't JIT'd at once (JIT-on-demand). In fact, an unmanaged AppDomain is created that loads the CLR and creates a managed AppDomain, then your executable is loaded into that AppDomain along with any dependent assemblies. It has to be loaded first or your application doesn't run.

How can you reduce memory? For once, implement a clean design. Close handles, dispose disposable objects, dispose modal forms (when you call ShowDialog) when you're finished with them. Use structs (allocated on the stack instead of the heap) when you need information on a short-lived duration (like a System.Windows.Forms.Message is used only for the current message, so there's no need to allocate it on the heap). All the things that computers science (or experience) should teach you.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: application uses all the memory Pin
Chen Pang17-Feb-04 23:13
Chen Pang17-Feb-04 23:13 
GeneralRe: application uses all the memory Pin
Heath Stewart18-Feb-04 3:55
protectorHeath Stewart18-Feb-04 3:55 
Generalclosing the main form after loading another form Pin
killermoses16-Feb-04 19:31
killermoses16-Feb-04 19:31 
GeneralRe: closing the main form after loading another form Pin
John Kuhn16-Feb-04 19:38
John Kuhn16-Feb-04 19:38 
GeneralRe: closing the main form after loading another form Pin
obelisk2916-Feb-04 19:48
obelisk2916-Feb-04 19:48 
GeneralRe: closing the main form after loading another form Pin
killermoses17-Feb-04 2:02
killermoses17-Feb-04 2:02 
GeneralRe: closing the main form after loading another form Pin
Heath Stewart17-Feb-04 5:26
protectorHeath Stewart17-Feb-04 5:26 
GeneralRe: closing the main form after loading another form Pin
Charlie Williams17-Feb-04 4:19
Charlie Williams17-Feb-04 4:19 
GeneralCalling Managed C++ code in a C# App Pin
granderson16-Feb-04 12:28
granderson16-Feb-04 12:28 
GeneralRe: Calling Managed C++ code in a C# App Pin
obelisk2916-Feb-04 19:41
obelisk2916-Feb-04 19:41 
GeneralMetrics 2 english 2 twips 2 whatever Pin
Tomaž Štih16-Feb-04 11:58
Tomaž Štih16-Feb-04 11:58 
GeneralRe: Metrics 2 english 2 twips 2 whatever Pin
Heath Stewart17-Feb-04 3:52
protectorHeath Stewart17-Feb-04 3:52 
GeneralPrinting from a webservice Pin
nathanreynolds16-Feb-04 11:31
nathanreynolds16-Feb-04 11:31 
GeneralRe: Printing from a webservice Pin
Heath Stewart17-Feb-04 3:26
protectorHeath Stewart17-Feb-04 3:26 
GeneralRe: Printing from a webservice Pin
nathanreynolds17-Feb-04 10:55
nathanreynolds17-Feb-04 10:55 
GeneralRe: Printing from a webservice Pin
Heath Stewart17-Feb-04 13:13
protectorHeath Stewart17-Feb-04 13:13 
GeneralRe: Printing from a webservice Pin
nathanreynolds17-Feb-04 16:27
nathanreynolds17-Feb-04 16:27 

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.