Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6167429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:30:41+00:00 2026-05-23T22:30:41+00:00

I have a complex database conversion console app that reads from an old database,

  • 0

I have a complex database conversion console app that reads from an old database, does a bunch of things, and puts into the new database.

I’m having an escalating memory problem where my mem usage (as monitored in task manager) constantly climbs and eventually slows down the process to a halt.

I’ve boiled it down to the simplest possible test POC to try and understand what’s going on.

for (int i = 0; i < 100000; i++)
{
  TestObj testc = new TestObj
    {
      myTest = "testing asdf"
    };
}
public class TestObj
{
    public string myTest;
}

My thought was that each testc that is created in the loop wouldn’t survive past the end of the iteration, but the way the memory is tracking it seems like the application is holding on to every instance of testc.

I’ve done a good amount of research and experimentation but I feel like there is something I’m missing here. Shouldn’t I be able to run this and have memory utilization stay rather constant?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:30:42+00:00Added an answer on May 23, 2026 at 10:30 pm

    You’re missing one key thing about garbage collection: The GC won’t run until it needs to. So yes, even though it’s nice enough to clean up after you, it still won’t do it until more memory is needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a complex network of objects being spawned from a sqlite database using
I have a complex .NET Remoting server app that provides a couple of services.
I have a complex object, with fields and reference to database that I would
I have a pretty complex database with loads of different tables for different things,
I have written a very complex database migration script in Groovy, that runs just
Does rails have any way to have complex sorting at the database query level?
I have a complex database that's looking like this: product *1 <-> n* inventory
I have a fairly complex database that needs to be deployed to a variety
I have a pretty complex database schema and would like to know if there
I have a complex command that I'd like to make a shell/bash script of.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.