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. Visual Basic
  4. large Memory used in .NET application

large Memory used in .NET application

Scheduled Pinned Locked Moved Visual Basic
csharpdebuggingperformancequestion
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.
  • M Offline
    M Offline
    maxfava
    wrote on last edited by
    #1

    Hi, try this with Windows XP or Window 2000: 1) create new windows application project. 2) Start debug. 3) press ctrl + Alt + Delete 4) Task manager 5) view the memory used by you application, it is 11 Mb. And if you add a simple dbconnection with dataadatper the memory used is ~24Mb. Is there a way to reduce the memory used by the application? In my application with simple 5 form it use 75 Mb of memory. It is too much.:(:confused: Max

    I A 2 Replies Last reply
    0
    • M maxfava

      Hi, try this with Windows XP or Window 2000: 1) create new windows application project. 2) Start debug. 3) press ctrl + Alt + Delete 4) Task manager 5) view the memory used by you application, it is 11 Mb. And if you add a simple dbconnection with dataadatper the memory used is ~24Mb. Is there a way to reduce the memory used by the application? In my application with simple 5 form it use 75 Mb of memory. It is too much.:(:confused: Max

      I Offline
      I Offline
      Ian Darling
      wrote on last edited by
      #2

      The task manager shows your working set, which isn't the same as the memory load of your process. The .NET Framework is included in that lot, as well as anything else which happens to be shared. Try pview for more accurate stats. -- Ian Darling

      1 Reply Last reply
      0
      • M maxfava

        Hi, try this with Windows XP or Window 2000: 1) create new windows application project. 2) Start debug. 3) press ctrl + Alt + Delete 4) Task manager 5) view the memory used by you application, it is 11 Mb. And if you add a simple dbconnection with dataadatper the memory used is ~24Mb. Is there a way to reduce the memory used by the application? In my application with simple 5 form it use 75 Mb of memory. It is too much.:(:confused: Max

        A Offline
        A Offline
        apferreira
        wrote on last edited by
        #3

        Contrary to popular belief, automaticall memory management in .Net is not equivalent to 100% total resource clean up. Coders still have the responsability of freeing some resources through the Dispose() method. Use dispose whenever available if you want to reduce memory footprint and avoid thoses cases where Net programs' memory usage continuously grows over time. (A five form program should never reach 75 Mb (unless it deals with very large quantities of data like uncompressed 20MB+ images) if coding practices are good. Also, try minimizing the form in your example and see how much memory it is using (much less). This happens because at startup your program is assigned a large working set to account for any initialization the CLR and associated dlls might need.

        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