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.
  • R Offline
    R Offline
    realJSOP
    wrote on last edited by
    #1

    Initialized an object when did a couple of new's (and contained the requisite delete's, and then re-initialized the same object later, forgetting that the process of initializing called "new". Sat there for a whole day wondering why an object that was "obviously deleted" was still bleeding memory all over hell and back. Cripes... ------- 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
    • R realJSOP

      Initialized an object when did a couple of new's (and contained the requisite delete's, and then re-initialized the same object later, forgetting that the process of initializing called "new". Sat there for a whole day wondering why an object that was "obviously deleted" was still bleeding memory all over hell and back. Cripes... ------- 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
      #2

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

      R R W 3 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
        realJSOP
        wrote on last edited by
        #3

        Not only no, but HELL no. I'd rather have to fix 100 memory leaks than use any of those pieces of 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

        K V 2 Replies Last reply
        0
        • R realJSOP

          Not only no, but HELL no. I'd rather have to fix 100 memory leaks than use any of those pieces of 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

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

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


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

          T B H 3 Replies 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

            T Offline
            T Offline
            Tim Smith
            wrote on last edited by
            #5

            And if you have a tool like Rational Purify, they take all of 10 minutes to find. Tim Smith I'm going to patent thought. I have yet to see any prior art.

            B K 2 Replies 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

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

              KaЯl wrote: At least with C++ we know where the memory leaks are! Hmm, too illogical for a C++ programmer. If you know where the leaks are, then they should all be fixed by now, no complaint is necessary. ;P

              K 1 Reply Last reply
              0
              • T Tim Smith

                And if you have a tool like Rational Purify, they take all of 10 minutes to find. 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
                #7

                Tim Smith wrote: And if you have a tool like Rational Purify, they take all of 10 minutes to find. 1. Those tools are too "good" to be useful. For example, they can find hundreds of "leaks" in a commercial library such as RogueWave. 2. Even if the leaks reported are true, they can be in third-party software which you can't touch. I know you can use only good third-party software developed with C++, but is it really practical?

                T L 2 Replies Last reply
                0
                • R realJSOP

                  Not only no, but HELL no. I'd rather have to fix 100 memory leaks than use any of those pieces of 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

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

                  John Simmons / outlaw programmer wrote: I'd rather have to fix 100 memory leaks than use any of those pieces of shit... But why, John? I remember myself involved in a project with multi-threaded DCOM server. Weeks spent on memory leak fixes. Yes, eventually all leaks were resolved, but was it creative work? I was like a detective hunting for a murderer. Yeah, that was fun in some way, but at that time I was not adding new features to our product, not getting new ideas. I am more and more on .NET now, and what a boost in efficiency! Вагиф Абилов 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

                  R 1 Reply Last reply
                  0
                  • T Tim Smith

                    And if you have a tool like Rational Purify, they take all of 10 minutes to find. Tim Smith I'm going to patent thought. I have yet to see any prior art.

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

                    Purify is a good tool, but I'm not able to use it anytime when the application becomes complex. I've got one where Purify sysematically crashes :)


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

                    L 1 Reply Last reply
                    0
                    • B Black Cat

                      Tim Smith wrote: And if you have a tool like Rational Purify, they take all of 10 minutes to find. 1. Those tools are too "good" to be useful. For example, they can find hundreds of "leaks" in a commercial library such as RogueWave. 2. Even if the leaks reported are true, they can be in third-party software which you can't touch. I know you can use only good third-party software developed with C++, but is it really practical?

                      T Offline
                      T Offline
                      Tim Smith
                      wrote on last edited by
                      #10

                      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 1 Reply Last reply
                      0
                      • B Black Cat

                        Tim Smith wrote: And if you have a tool like Rational Purify, they take all of 10 minutes to find. 1. Those tools are too "good" to be useful. For example, they can find hundreds of "leaks" in a commercial library such as RogueWave. 2. Even if the leaks reported are true, they can be in third-party software which you can't touch. I know you can use only good third-party software developed with C++, but is it really practical?

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

                        Black Cat wrote: Even if the leaks reported are true, they can be in third-party software which you can't touch This can be a good thing. I have a printing app that is susceptible to leaks in printer drivers, and I have used Purify logs to prove this to a certain printer manufacturer. Not only did this get my customer off my back, but the manufacturer actually fixed the leak (eventually). Personally I find Purify indispensable. Tools like this and BoundsChecker will easily pay for themselves in the long run.


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

                        R 1 Reply Last reply
                        0
                        • K KaRl

                          Purify is a good tool, but I'm not able to use it anytime when the application becomes complex. I've got one where Purify sysematically crashes :)


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

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

                          I had something similar but I reported the problem to Rational and they soon fixed the problem. In fact, I have nothing but praise for Rational Tech Support.


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

                          K 1 Reply Last reply
                          0
                          • B Black Cat

                            KaЯl wrote: At least with C++ we know where the memory leaks are! Hmm, too illogical for a C++ programmer. If you know where the leaks are, then they should all be fixed by now, no complaint is necessary. ;P

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

                            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 1 Reply Last reply
                            0
                            • L Lost User

                              I had something similar but I reported the problem to Rational and they soon fixed the problem. In fact, I have nothing but praise for Rational Tech Support.


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

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

                              I wasn't allowed to do so :(( But it's a good info to keep when I'll find another job :)


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

                              1 Reply Last reply
                              0
                              • L Lost User

                                Black Cat wrote: Even if the leaks reported are true, they can be in third-party software which you can't touch This can be a good thing. I have a printing app that is susceptible to leaks in printer drivers, and I have used Purify logs to prove this to a certain printer manufacturer. Not only did this get my customer off my back, but the manufacturer actually fixed the leak (eventually). Personally I find Purify indispensable. Tools like this and BoundsChecker will easily pay for themselves in the long run.


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

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

                                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 1 Reply Last reply
                                0
                                • V Vagif Abilov

                                  John Simmons / outlaw programmer wrote: I'd rather have to fix 100 memory leaks than use any of those pieces of shit... But why, John? I remember myself involved in a project with multi-threaded DCOM server. Weeks spent on memory leak fixes. Yes, eventually all leaks were resolved, but was it creative work? I was like a detective hunting for a murderer. Yeah, that was fun in some way, but at that time I was not adding new features to our product, not getting new ideas. I am more and more on .NET now, and what a boost in efficiency! Вагиф Абилов 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

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

                                  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 1 Reply Last reply
                                  0
                                  • 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
                                          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