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. The Lounge
  3. Memory Leaks Suck

Memory Leaks Suck

Scheduled Pinned Locked Moved The Lounge
performance
43 Posts 12 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.
  • T Tim Smith

    Too good to be useful? Don't be silly. They have saved me tons of time. Also, if the memory leak is in a 3rd party application you can't touch, then, well YOU CAN'T TOUCH IT. But at least you know have proof it is in that 3rd party software. Tim Smith I'm going to patent thought. I have yet to see any prior art.

    B Offline
    B Offline
    Black Cat
    wrote on last edited by
    #17

    Tim Smith wrote: Too good to be useful? Don't be silly. They have saved me tons of time. So, you are in favor of letting the technolog handle the memory-leak problem, right? Now, comparing the following two options: 1. Write a C++ app that has a lot of memory leaks, and then buy a tool like Purify to find the leaks and plug them. 2. Write a .NET app that is impossible to have a memory leak. Nah, only an idiot will choose 2, it's too damn easy! ;P

    B R 2 Replies Last reply
    0
    • B Black Cat

      John Simmons / outlaw programmer wrote: Memory Leaks Suck Is any of the following looking more attractive to you today? .NET, Java, VB ;P

      R Offline
      R Offline
      Ryan_Roberts
      wrote on last edited by
      #18

      A decent shared pointer class can prevent weeks of pain and anguish, try boost::shared_ptr and keep your nassty C#. Cyclic IUnknown::AddRef()'s, now they really suck. Ryan

      They read good books, and quote, but never learn a language other than the scream of rocket-burn. Our straighter talk is drowned but ironclad; elections, money, empire, oil and Dad.

      1 Reply Last reply
      0
      • R realJSOP

        Robert Edward Caldecott wrote: Not only did this get my customer off my back, but the manufacturer actually fixed the leak (eventually). It must not have been an HP printer. HP only supports their printers for one day, and then they release a new model, dropping support for their "legacy" hardware in process... ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends

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

        You're right. It wasn't an HP. It was a Lexmark. HP printer drivers are notoriously leaky, and HP support couldn't give a damn. Their idea of testing a printer driver is to print a couple of pages from Word, and if nothing crashes then the driver passes. When the HP4050 first came out back in 1998 it included a driver that leaked ~1MB every 100 pages printed which caused me and my company a whole load of sh*t.


        When I am king, you will be first against the wall.

        1 Reply Last reply
        0
        • B Black Cat

          Tim Smith wrote: Too good to be useful? Don't be silly. They have saved me tons of time. So, you are in favor of letting the technolog handle the memory-leak problem, right? Now, comparing the following two options: 1. Write a C++ app that has a lot of memory leaks, and then buy a tool like Purify to find the leaks and plug them. 2. Write a .NET app that is impossible to have a memory leak. Nah, only an idiot will choose 2, it's too damn easy! ;P

          B Offline
          B Offline
          benjymous
          wrote on last edited by
          #20

          Or 1. Write a well-written C++ app, and handle memory yourself, so you know exactly what it's doing 2. Write a .NET app and just hide in a corner and pretend the memory issue doesn't exist at all -- Help me! I'm turning into a grapefruit!

          B J 2 Replies Last reply
          0
          • R realJSOP

            Vagif Abilov wrote: But why, John? VB - You gotta be kidding me. I actually have to tell you *why* I wouldn't use VB? Java - Because of javascript. Anything that has a scripting version has gotta be as big of a piece of shit as the scripting version. Besides, it's slower than a segway... .NET - Microsoft proprietary bullshit. I wouldn't write a "managed" C++ app on a bet (unless it involves my current employment). Can you say "VB wrapped in C++"? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends

            V Offline
            V Offline
            Vagif Abilov
            wrote on last edited by
            #21

            OK, I'll explain myself. VB - You gotta be kidding me. I actually have to tell you *why* I wouldn't use VB? No, I didn't mean VB. I'm with about this one :) Java - Because of javascript. I didn't mean Java either. .NET - Microsoft proprietary bullshit. I wouldn't write a "managed" C++ app on a bet (unless it involves my current employment). Can you say "VB wrapped in C++"? No, I don't think C# has anything with VB wrapped in C++. The more I work with C#, the more I'm convinced with its elegancy and efficiency. And they're even working on generics! I've been using STL for some time but still am not able to declare map iterator without syntax error at first attempt. Yes, .NET comes with non-deterministic memory management, but as soon I realized it was managing it well, I let it do it for me. Вагиф Абилов MCP (Visual C++) Oslo, Norway Hex is for sissies. Real men use binary. And the most hardcore types use only zeros - uppercase zeros and lowercase zeros. Tomasz Sowinski

            1 Reply Last reply
            0
            • K KaRl

              At least with C++ we know where the memory leaks are!


              Angels banished from heaven have no choice but to become demons Cowboy Bebop

              H Offline
              H Offline
              Hel
              wrote on last edited by
              #22

              At least with C++ we know WHAT memory leaks are! well hell doesn't want you and heaven is full. Tom Waits

              K B 2 Replies Last reply
              0
              • H Hel

                At least with C++ we know WHAT memory leaks are! well hell doesn't want you and heaven is full. Tom Waits

                K Offline
                K Offline
                KaRl
                wrote on last edited by
                #23

                :laugh: IMO, it deserves a 5! :cool:


                Angels banished from heaven have no choice but to become demons Cowboy Bebop

                1 Reply Last reply
                0
                • B benjymous

                  Or 1. Write a well-written C++ app, and handle memory yourself, so you know exactly what it's doing 2. Write a .NET app and just hide in a corner and pretend the memory issue doesn't exist at all -- Help me! I'm turning into a grapefruit!

                  B Offline
                  B Offline
                  Black Cat
                  wrote on last edited by
                  #24

                  benjymous wrote: 1. Write a well-written C++ app, and handle memory yourself, so you know exactly what it's doing Yes! That's more like a C++ cowboy. I have no argument with people who have so much confidence in them. But don't forget, Mr. Tim Smith isn't so confident, he would rather trust Purify to find all the leaks.

                  B R 2 Replies Last reply
                  0
                  • H Hel

                    At least with C++ we know WHAT memory leaks are! well hell doesn't want you and heaven is full. Tom Waits

                    B Offline
                    B Offline
                    Black Cat
                    wrote on last edited by
                    #25

                    Hel wrote: At least with C++ we know WHAT memory leaks are! How about: At least with C++ we have memory leaks! :laugh: :laugh:

                    H 1 Reply Last reply
                    0
                    • B Black Cat

                      Hel wrote: At least with C++ we know WHAT memory leaks are! How about: At least with C++ we have memory leaks! :laugh: :laugh:

                      H Offline
                      H Offline
                      Hel
                      wrote on last edited by
                      #26

                      Black Cat wrote: At least with C++ we have memory leaks! Only the brave deserve to leak... well hell doesn't want you and heaven is full. Tom Waits

                      1 Reply Last reply
                      0
                      • B Black Cat

                        benjymous wrote: 1. Write a well-written C++ app, and handle memory yourself, so you know exactly what it's doing Yes! That's more like a C++ cowboy. I have no argument with people who have so much confidence in them. But don't forget, Mr. Tim Smith isn't so confident, he would rather trust Purify to find all the leaks.

                        B Offline
                        B Offline
                        benjymous
                        wrote on last edited by
                        #27

                        That's just silly. Which would you trust more: Developer one who says "Yes, my code hasn't got any memory leaks. I know because I'm a good programmer, and I wouldn't make mistakes like that" or Developer two who says "Yes, my code hasn't got any memory leaks, because I rigourously tested it with a wide range of tools" -- Help me! I'm turning into a grapefruit!

                        B 1 Reply Last reply
                        0
                        • K KaRl

                          Black Cat wrote: Hmm, too illogical for a C++ programmer Nah, that's correct. Would "We are able to know where the memory leaks are" be better? To remember: to be attentive to Mr/Miss/Mrs Black Cat logic and expression ;P


                          Angels banished from heaven have no choice but to become demons Cowboy Bebop

                          B Offline
                          B Offline
                          Black Cat
                          wrote on last edited by
                          #28

                          KaЯl wrote: Would "We are able to know where the memory leaks are" be better? Better than what? Better than "Having no memory leak at all"? ;)

                          K 1 Reply Last reply
                          0
                          • B Black Cat

                            benjymous wrote: 1. Write a well-written C++ app, and handle memory yourself, so you know exactly what it's doing Yes! That's more like a C++ cowboy. I have no argument with people who have so much confidence in them. But don't forget, Mr. Tim Smith isn't so confident, he would rather trust Purify to find all the leaks.

                            R Offline
                            R Offline
                            realJSOP
                            wrote on last edited by
                            #29

                            That's not anything like what he said, nor even implied. He said he uses Purify to find memory leaks that would otherwise may well have taken him days to locate on his own. That's not a lack of confidence, that's using the right tool for the right job. Stop saying stupid shit... ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends

                            B 1 Reply Last reply
                            0
                            • B Black Cat

                              KaЯl wrote: Would "We are able to know where the memory leaks are" be better? Better than what? Better than "Having no memory leak at all"? ;)

                              K Offline
                              K Offline
                              KaRl
                              wrote on last edited by
                              #30

                              "Having no memory leak at all" or "Having no memory leak visible, hoping the OS will clean" ? ;P When an application becomes more complex than "Hello Word", Garbage collectors suck !


                              Angels banished from heaven have no choice but to become demons Cowboy Bebop

                              1 Reply Last reply
                              0
                              • B Black Cat

                                Looks like I can just call Server.Redirect("Mr. Tim Smith") and let you two C++ programmers talk it over. ;)

                                B Offline
                                B Offline
                                benjymous
                                wrote on last edited by
                                #31

                                What is there to discuss - I'm just agreeing with him that using extra tools to help bulletproof your software and remove bugs is a good thing, rather than a sign of a bad programmer. Ok, in an ideal world programmers would write code that worked flawlessly first time, but we know that that isn't going to happen -- Help me! I'm turning into a grapefruit!

                                1 Reply Last reply
                                0
                                • B benjymous

                                  That's just silly. Which would you trust more: Developer one who says "Yes, my code hasn't got any memory leaks. I know because I'm a good programmer, and I wouldn't make mistakes like that" or Developer two who says "Yes, my code hasn't got any memory leaks, because I rigourously tested it with a wide range of tools" -- Help me! I'm turning into a grapefruit!

                                  B Offline
                                  B Offline
                                  Black Cat
                                  wrote on last edited by
                                  #32

                                  Looks like I can just call Server.Redirect("Mr. Tim Smith") and let you two C++ programmers talk it over. ;)

                                  B R 2 Replies Last reply
                                  0
                                  • B Black Cat

                                    Looks like I can just call Server.Redirect("Mr. Tim Smith") and let you two C++ programmers talk it over. ;)

                                    R Offline
                                    R Offline
                                    realJSOP
                                    wrote on last edited by
                                    #33

                                    You might think you're funny, but I, for one, wish you would stop acting like a dick. To the CP old-timers - yeah I know.... "pot = kettle = black;" ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends

                                    L 1 Reply Last reply
                                    0
                                    • R realJSOP

                                      That's not anything like what he said, nor even implied. He said he uses Purify to find memory leaks that would otherwise may well have taken him days to locate on his own. That's not a lack of confidence, that's using the right tool for the right job. Stop saying stupid shit... ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends

                                      B Offline
                                      B Offline
                                      Black Cat
                                      wrote on last edited by
                                      #34

                                      John Simmons / outlaw programmer wrote: He said he uses Purify to find memory leaks that would otherwise may well have taken him days to locate on his own. That's not a lack of confidence, that's using the right tool for the right job. So you agree that C++ alone is not the right tool, and you have to add things like Purify when there are too many hard to track memory leaks. However, as soon as I mention .NET your eyes are turning red like a texas bull. No one is saying .NET is perfect here, if you calm down and read things carefully. .NET, VB, C++, and Java are just tools to me, and I choose them according to the job at hand. So there you go, we may be in complete agreement. ;) John Simmons / outlaw programmer wrote: Stop saying stupid shit... You have been providing some of the most entertaining posts to CodeProject, but I am really disappointed this time, the staggering layers of stupidty in your statement make it a work of art on so many levels. Do I get the honor of being quoted in your signature? Please, please! ;P

                                      W R 2 Replies Last reply
                                      0
                                      • B Black Cat

                                        John Simmons / outlaw programmer wrote: Memory Leaks Suck Is any of the following looking more attractive to you today? .NET, Java, VB ;P

                                        W Offline
                                        W Offline
                                        William E Kempf
                                        wrote on last edited by
                                        #35

                                        Nope, you can have memory leaks in all of those as well. In fact, I just recently saw a vendor's demo for a spiffy diagnostic tool used to locate and fix memory leaks in Java. GC is useful, but it's not a silver bullet, and the sooner people realize that the better. William E. Kempf

                                        1 Reply Last reply
                                        0
                                        • B Black Cat

                                          John Simmons / outlaw programmer wrote: He said he uses Purify to find memory leaks that would otherwise may well have taken him days to locate on his own. That's not a lack of confidence, that's using the right tool for the right job. So you agree that C++ alone is not the right tool, and you have to add things like Purify when there are too many hard to track memory leaks. However, as soon as I mention .NET your eyes are turning red like a texas bull. No one is saying .NET is perfect here, if you calm down and read things carefully. .NET, VB, C++, and Java are just tools to me, and I choose them according to the job at hand. So there you go, we may be in complete agreement. ;) John Simmons / outlaw programmer wrote: Stop saying stupid shit... You have been providing some of the most entertaining posts to CodeProject, but I am really disappointed this time, the staggering layers of stupidty in your statement make it a work of art on so many levels. Do I get the honor of being quoted in your signature? Please, please! ;P

                                          W Offline
                                          W Offline
                                          William E Kempf
                                          wrote on last edited by
                                          #36

                                          You seem to be misguided on several counts, however: 1) It's not that difficult to manage memory correctly in C++ using tools like boost::shared_ptr. 2) There are full GC systems available for C++, if you prefer. 3) All of the languages you list are still prone to memory leaks, and the idea that GC makes this impossible has actually lead to there being a LOT of poorly designed and implemented libraries in said languages. You can only "choose them according to the job at hand" if you actually understand the pros and cons of the choices. Sounds like you don't. Further, it sounds like instead of promoting the "right tool for the right job" school of thought, you prefer to at least hint that C++ is never the right tool. William E. Kempf

                                          B 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