Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. Memory is not Released in Windows Application when ever any Form is Closed

Memory is not Released in Windows Application when ever any Form is Closed

Scheduled Pinned Locked Moved Windows Forms
csharpdata-structuresperformancehelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    k_kedarnadh
    wrote on last edited by
    #1

    Hi All, I m developing one Windows Application in C# in VS2008. The following problem occurred in my application. 1. In my application when u open a Form the memory usage is increased to 100MB. This Form Contains more than 50000 Tree Nodes. These Nodes taking that amount of memory. Then After if i closing that opened Form how much amount of memory is raised when that form is opened that amount of memory is not released when that form is closed. Please give me solution for this how to free the memory when that form is closed. Thanks, Kedar

    L D 2 Replies Last reply
    0
    • K k_kedarnadh

      Hi All, I m developing one Windows Application in C# in VS2008. The following problem occurred in my application. 1. In my application when u open a Form the memory usage is increased to 100MB. This Form Contains more than 50000 Tree Nodes. These Nodes taking that amount of memory. Then After if i closing that opened Form how much amount of memory is raised when that form is opened that amount of memory is not released when that form is closed. Please give me solution for this how to free the memory when that form is closed. Thanks, Kedar

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      k_kedarnadh wrote:

      that amount of memory is not released

      who says? objects that are no longer reachable become collectible, so when your app needs memory and runs its GC, it will collect them and reuse the memory. Most often it will not return the memory to Windows though, why should it? It would return what is redundant to Windows when your app gets minimized. :)

      Luc Pattyn


      I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


      1 Reply Last reply
      0
      • K k_kedarnadh

        Hi All, I m developing one Windows Application in C# in VS2008. The following problem occurred in my application. 1. In my application when u open a Form the memory usage is increased to 100MB. This Form Contains more than 50000 Tree Nodes. These Nodes taking that amount of memory. Then After if i closing that opened Form how much amount of memory is raised when that form is opened that amount of memory is not released when that form is closed. Please give me solution for this how to free the memory when that form is closed. Thanks, Kedar

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        If you're looking in TaskManager, you're looking in the wrong place to see how much memory your app is actually using.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups