C# and garbage collection

Discussion in 'ASP.NET / ASP.NET Core' started by sjwanderer, Sep 7, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I recently had a discussion with someone and they insisted that for every new object created in C# you MUST call the dispose method and force garbage collection to occur. My understanding of C# was that this was not required as the native classes are managed and will clean up when the dispose method of the page occurs, or was I misled somewhere???
    Thanks
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    .NET indeed has it's own garbage collection. My understanding is that garbage collection is not real time and it's wise to manually collect em if your process is memory intensive.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page