473,545 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory Managment/Objects lifecycle managment

LP
Hello .NET experts

A group of develpers here are having some arguements about different ways to
write program with minimal memory footprint.
One method in buisness class creates an instance of another class and calls
its method that does database related work. This buisness class methods is
being called in a loop, so everytime it executes it creats 1 instance of
db-related object.
Another developer sugested making db-related object a class member, rather
then local to a method, and create new instance of it in class constructor.
Considering Garbage Collection in .NET will this make any difference?
What are the best practices in general to minimize memory footprint of .NET
apps ?
Thank you so much.
Nov 16 '05 #1
1 1363
hi
check this blog of Jeffrey Richter
http://wintellect.com/WEBLOGS/wintel...11/13/627.aspx
regards
Ansil
Trivandrum

"LP" wrote:
Hello .NET experts

A group of develpers here are having some arguements about different ways to
write program with minimal memory footprint.
One method in buisness class creates an instance of another class and calls
its method that does database related work. This buisness class methods is
being called in a loop, so everytime it executes it creats 1 instance of
db-related object.
Another developer sugested making db-related object a class member, rather
then local to a method, and create new instance of it in class constructor.
Considering Garbage Collection in .NET will this make any difference?
What are the best practices in general to minimize memory footprint of .NET
apps ?
Thank you so much.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4058
by: D. Buck | last post by:
Details: MS SQL 2000 dual Intel 1.2 GHz processors. 1 GB RAM 2.1 GB dB Dynamic Memory Managment. No other apps running on this server. First question: Since I have Dynamic Memory Managment setup, Is it usuall that the sqlsrv.exe process on the server steadily climbs and is in the 800 to
6
2283
by: Andrzej | last post by:
Used to read newsgroup for answers, now have to ask for them as well. I have an application (C#, .NET 1.1) that connects to local db on MSDE 2000 SP3a (using ADO from MDAC 2.71) on one side and to a web service on the other (not relevant I guess). Some stored procedures consume xml produced by DataSet objects (values as elements) using...
1
1486
by: Ashish | last post by:
hi all we have tested out web site for performance and we observed that the asp.net process does disposes memory ( as opposed to my earlier observation ), i was just curious if the asp.net process is designed to use upto certain amount of memory, or can make use good use to memory only upto a certain limit .... also if anyone can point to...
13
1505
by: Nikolay Petrov | last post by:
I've got this issue: When I start my application it takes a lot of memory. I guess this is caused by CLR. That's fine. But every time the app performs an action (open new form, load data in dataset, something, it doesn't matter) the memory used by the application increases. After using it half an hour it grows so big that most of PCs here...
1
939
by: LP | last post by:
Hello .NET experts A group of develpers here are having some arguements about different ways to write program with minimal memory footprint. One method in buisness class creates an instance of another class and calls its method that does database related work. This buisness class methods is being called in a loop, so everytime it executes...
2
4568
by: Daniel | last post by:
Hi, I have a question regarding the memory managment in stl stacks. I want to use stacks to store a very large amount of numbers (some millions), thus I'm interested in how the stack behaves when it has to increase its memory. http://www.sgi.com/tech/stl/stack.html, the stacks default underlying container is a deque that has amortized...
6
26392
by: Chris Ashley | last post by:
How can I manually release the memory held by a large array? I have tried setting the array to null but no joy. The garbage collector appears to be ignoring it completely.
11
7197
by: Grey Alien | last post by:
Any one know of an open source memory pool library?. I can't seem to find any implemented in C (many available in C++ e.g. Boost). Google is not turning up anything useful ...
2
1022
by: Jack Jackson | last post by:
On Wed, 11 Jun 2008 07:32:30 +0200, "Fred" <foleide@free.fr.invalid> wrote: If the control will soon be eligible for garbage collection, then no. If the control won't be eligible for garbage collection soon, then setting the Tag property to null will allow the object references by Tag to be collected sooner (assuming there are no other...
0
7502
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7692
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7457
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
744
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.