5 Tips and Techniques for Avoiding Automatic Garbage Collections(www.simple-talk.com)

submitted by dpetersondpeterson(4397) 6 months, 22 days ago

We've seen a few articles lately on ensuring that your memory is properly cleaned up during garbage collection, but today Michael McLaughlin comes in with tips to avoid automatic collection of your objects. Generally speaking, this is for performance reasons. Garbage collection in .Net 4 and earlier happens automatically and blocks program execution, which can be disastrous for certain types of applications (games, real-time analysis, etc).

2 comments |category: |Views: 231

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by vijaystvijayst(1311) 6 months, 21 days ago 0

In my opinion, full GC is expensive. GC0 should not take much time.

Reply

posted by NoldorinNoldorin(829) 6 months, 20 days ago 0

I've seen a lot of these articles (well written mostly, it must be said) about Garbage Collection pitfalls/issues/troubleshooting in .NET... All well and good, you might think. I however am of the opinion a managed language really should do a very good job of managing memory for you in *all* cases, unless you explicitly need to tamper with the GC. Really, aren't we just eliminating one of the main advantages of a managed language otherwise, if the GC isn't doing its job properly?

Reply

information Login or create an account to comment on this story