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#, Java and memory

C#, Java and memory

Scheduled Pinned Locked Moved C#
csharpquestionc++javavisual-studio
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.
  • A Offline
    A Offline
    albean
    wrote on last edited by
    #1

    C# seems to use a lot of memory (compared to some of my C++ programs that do similar things.) I was just wondering what you all have observed and I would love to hear the comments of any Java programmers out there. Does Java’s garbage collection work better/faster….. ? (I hope this last question does not start a religious flame war.) Is there some way to “view” a running C# app in Visual Studio and see what objects have a reference (and therefore are not up for garbage collection)?

    Y K 2 Replies Last reply
    0
    • A albean

      C# seems to use a lot of memory (compared to some of my C++ programs that do similar things.) I was just wondering what you all have observed and I would love to hear the comments of any Java programmers out there. Does Java’s garbage collection work better/faster….. ? (I hope this last question does not start a religious flame war.) Is there some way to “view” a running C# app in Visual Studio and see what objects have a reference (and therefore are not up for garbage collection)?

      Y Offline
      Y Offline
      Ylis
      wrote on last edited by
      #2

      I think I've read somewhere that the reason for it is the extremly large header included with the .NET framework. If for example you create an MDI application which spawns child windows inside the parent those new windows wont take a lot of memory.

      1 Reply Last reply
      0
      • A albean

        C# seems to use a lot of memory (compared to some of my C++ programs that do similar things.) I was just wondering what you all have observed and I would love to hear the comments of any Java programmers out there. Does Java’s garbage collection work better/faster….. ? (I hope this last question does not start a religious flame war.) Is there some way to “view” a running C# app in Visual Studio and see what objects have a reference (and therefore are not up for garbage collection)?

        K Offline
        K Offline
        KingTermite
        wrote on last edited by
        #3

        Yes, I have noticed this too...I've assumed it was related to the .Net framework. I have used Java before this, though, and I think it was even more memory hungry.


        There are only 10 types of people in this world....those that understand binary, and those that do not.

        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