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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:44:58+00:00 2026-05-14T02:44:58+00:00

Ignoring unsafe code, .NET cannot have memory leaks. I’ve read this endlessly from many

  • 0

Ignoring unsafe code, .NET cannot have memory leaks. I’ve read this endlessly from many experts and I believe it. However, I do not understand why this is so.

It is my understanding that the framework itself is written in C++ and C++ is susceptible to memory leaks.

  • Is the underlying framework so well-written, that it absolutely does not have any possibility of internal memory leaks?
  • Is there something within the framework’s code that self-manages and even cures its own would-be memory leaks?
  • Is the answer something else that I haven’t considered?
  • 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-14T02:44:58+00:00Added an answer on May 14, 2026 at 2:44 am

    There are already some good answers here, but I want to address one additional point. Let’s look very carefully again at your specific question:


    It is my understanding that the framework itself is written in C++ and C++ is susceptible to memory leaks.

    • Is the underlying framework so well-written, that it absolutely does not have any possibility of internal memory leaks?
    • Is there something within the framework’s code that self-manages and even cures its own would-be memory leaks?
    • Is the answer something else that I haven’t considered?

    The key here is to distinguish between your code and their code. The .Net framework (and Java, Go, python, and other garbage-collected languages) promise that if you rely on their code, your code will not leak memory… at least in the traditional sense. You might find yourself in situations where some objects are not freed as you expect, but these cases are subtly different from traditional memory leaks because the objects are still reachable in your program.

    You are confused because you correctly understand that this is not the same thing as saying any program you create can’t possibly have a traditional memory leak at all. There could still be a bug in their code that leaks memory.

    So now you have to ask yourself: would you rather trust your code, or their code? Keep in mind here that their code is not only tested by the original developers (just like yours, right?), it’s also battle-hardened from daily use by thousands (perhaps millions) of other programmers like yourself. Any significant memory leak issues would be among the first things identified and corrected. Again, I’m not saying it’s not possible. It’s just that it’s generally a better idea to trust their code than it is your own… at least in this respect.

    Therefore the correct answer here is that it’s a variant of your first suggestion:

    Is the underlying framework so well-written, that it absolutely does not have any possibility of internal memory leaks?

    It’s not that there’s no possibility, but that it’s much safer than managing it yourself. I’m certainly not aware of any known leaks in the framework.

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

Sidebar

Related Questions

Ignoring version, what are the best practices for formatting SQL code? I prefer this
Internet Explorer seems to be ignoring this ajax function call (below) but it works
I've read several posts here about ignoring files in Mercurial but I'm stumped on
I am using Mvvm-Light and have been ignoring how binding in XAML really works
Ignoring the IE case, are there any other browsers that can't understand the application/xhtml+xml
Ignoring programming style and design, is it safe to call delete on a variable
Is there an easy way of using the RegularExpressionValidator control while ignoring white space?
Is there a function in Python to split a string without ignoring the spaces
Is there a way to easily sort in SQL Server 2005 while ignoring hyphens
What is the easiest way to compare strings in Python, ignoring case? Of course

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.