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. C#
  4. C# simple windows form taking alot of RAM

C# simple windows form taking alot of RAM

Scheduled Pinned Locked Moved C#
csharphelpquestion
4 Posts 4 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.
  • A Offline
    A Offline
    Adeel Chaudhry
    wrote on last edited by
    #1

    Hello! I am looking for some suggestions/tips for the following issue: I have a C# Windows application having 1 form. In that form i have 12 text-boxes, 2 progress-bars, 5 buttons, status strip and 5 group-boxes.....as displayed in task manager, it is taking more than 25 MB of RAM! I haven't placed any code yet, any recommendation/tip/suggestion for the issue will be appreciated. BTW, any idea how much RAM should it be taking? Regards, Adeel

    Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.

    C N 2 Replies Last reply
    0
    • A Adeel Chaudhry

      Hello! I am looking for some suggestions/tips for the following issue: I have a C# Windows application having 1 form. In that form i have 12 text-boxes, 2 progress-bars, 5 buttons, status strip and 5 group-boxes.....as displayed in task manager, it is taking more than 25 MB of RAM! I haven't placed any code yet, any recommendation/tip/suggestion for the issue will be appreciated. BTW, any idea how much RAM should it be taking? Regards, Adeel

      Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Adeel Chaudhry wrote:

      BTW, any idea how much RAM should it be taking?

      25 MB seems fine to me. Remember, there's a residual amount of RAM before you start adding stuff. A second form won't make it 50 MB.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      R 1 Reply Last reply
      0
      • C Christian Graus

        Adeel Chaudhry wrote:

        BTW, any idea how much RAM should it be taking?

        25 MB seems fine to me. Remember, there's a residual amount of RAM before you start adding stuff. A second form won't make it 50 MB.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        R Offline
        R Offline
        Reelix
        wrote on last edited by
        #3

        I agree with Christian on this one. It seems the simplest Windows App takes +- 20MB RAM, and then any (Not-too intensive) code takes up insignificantly more. Create a "Hello World!" windows form to see what I mean. I'm not exactly sure WHY, but that's the way it works :) We should learn from C++, where A "Hello World!" Form-Based app takes like 200k RAM ;) :laugh:

        -= Reelix =-

        1 Reply Last reply
        0
        • A Adeel Chaudhry

          Hello! I am looking for some suggestions/tips for the following issue: I have a C# Windows application having 1 form. In that form i have 12 text-boxes, 2 progress-bars, 5 buttons, status strip and 5 group-boxes.....as displayed in task manager, it is taking more than 25 MB of RAM! I haven't placed any code yet, any recommendation/tip/suggestion for the issue will be appreciated. BTW, any idea how much RAM should it be taking? Regards, Adeel

          Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.

          N Offline
          N Offline
          natsuyaki
          wrote on last edited by
          #4

          I've just created an application as your description ;P It takes up about 3.5M at startup and always keeps below 4.5M. Don't know why... : :(

          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