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 / C++ / MFC
  4. What is the difference in C and C++ in terms of memory management ?

What is the difference in C and C++ in terms of memory management ?

Scheduled Pinned Locked Moved C / C++ / MFC
performancequestioncode-reviewc++
4 Posts 4 Posters 3 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.
  • G Offline
    G Offline
    Gulshan Negi
    wrote on last edited by
    #1

    Hello this is Gulshan Negi Well, I want to know about how C and C++ differ in terms of their memory management and performance capabilities, and what strategies can be used to optimize code and improve performance in each language? I need some suggestions on this. Thanks

    L J 2 Replies Last reply
    0
    • G Gulshan Negi

      Hello this is Gulshan Negi Well, I want to know about how C and C++ differ in terms of their memory management and performance capabilities, and what strategies can be used to optimize code and improve performance in each language? I need some suggestions on this. Thanks

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The difference will depend very much on the implementation of the compiler and associated libraries.

      A 1 Reply Last reply
      0
      • G Gulshan Negi

        Hello this is Gulshan Negi Well, I want to know about how C and C++ differ in terms of their memory management and performance capabilities, and what strategies can be used to optimize code and improve performance in each language? I need some suggestions on this. Thanks

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        Gulshan Negi wrote:

        performance in each language

        Performance is based on the following # Requirements - Most significant. # Architecture/Design (high level) # Implementation # Technology - Least significant. Your question fits into the last one of those. If you are very, very good at the first three or your problem (the complete solution) is very, very small then the last one might be the most significant.

        1 Reply Last reply
        0
        • L Lost User

          The difference will depend very much on the implementation of the compiler and associated libraries.

          A Offline
          A Offline
          Avijeet Singh 2023
          wrote on last edited by
          #4

          C uses malloc and free for memory allocation while C++ uses new and delete for memory allocation. C does not provide direct support for error handling, while C++ supports exception handling that helps in error detection and smooth handling

          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