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 8264925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:37:34+00:00 2026-06-08T04:37:34+00:00

I have created server application that has to process some data (that is quite

  • 0

I have created server application that has to process some data (that is quite heavy process) before it starts listening clients. In the result it allocates memory (approximately 30MB) that will never be used but once.

Will it give me a benefit to force garbage collection? Or let GC do its work?

Also I have to use .NET 3.5 and as far as I know garbage collection will interrupt thread that’s why I came to forcing Garbage Collector.

  • 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-06-08T04:37:36+00:00Added an answer on June 8, 2026 at 4:37 am

    OK look, garbage collection is still just a heuristic, it’s trying to do the best guess it can in general, but it may be possible that you have a legitimate claim at knowing better than it at particular times.

    Take for example a game with a lot of assets. When you switch to a new zone, you pop up a loading screen and start loading your new data, releasing references to the old data. It won’t get collected yet because you haven’t hit your threshold, but you might hit it soon as you’re starting to create your little matrices every frame to present your game, and then you’ll get a (possibly noticeable) stutter as you’re unloading hundreds of megs of data and moving everything else around to compact the queues.

    Now you can instead force a collect after the new assets were loaded, since the user is already in “idle” mode, staring at your progress bar, he won’t notice the little stutter and your game will seem smoother overall afterwards.

    The real trick then becomes knowing when to interfere and when not to. When in doubt, don’t — that collection will happen regardless, and making it happen more often will only make your application seem more stuttery. You need something to “hide” it, like a long task that locks your application with a progress bar that somehow generates a lot of finalized objects — really a game loading screen is the only thing I can come up with, but YMMV.

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

Sidebar

Related Questions

I have created an application server side that will create a pdf of a
I have created an application that connect on a web-server and reads an xml
I have an application that has many threads processing data. As part of this
I have a C# Windows Forms application, whose prototype was created on SQL Server
I have a database that I have created using SQL Server Developer 2008. I
In my application, I have URN-identified data coming in from the server. I'm in
I have a CoreData application with dynamic data that is updated once a day
I have an Android application that has a service that runs in the background,
I have created SQL Server database by Visual Studio 2010 Ultimate means in Visual
I have created a server in java which accepts client connections. But I am

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.