Memory Managment/Objects lifecycle managment

  • Thread starter Thread starter LP
  • Start date Start date
L

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top