The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Memory leak in C++ Code - help needed! by perpeduumimmobl2005-10-06 07:48:23
  memory barf by onur 2005-10-06 08:18:13
Umm. Firstly, what's with the new? is this some java hype? you don't need to allocate the stringstream on freestore. The stream is built to manage the freestore for you if any is neccessary.

std::istringstream convert(s); convert>> value;

second, valgrind sometimes reports libstdc++ memory leaks because gcc uses some memory pool which is freed after the point valgrind can watch what's going on. That's in the valgrind faq.

third, why is this in userfriendly forums?

- Onur T.
[ Reply ]
    Because a lot of us are developers by ToLazyToThink2005-10-06 08:22:20
      Yeah, geez, like chill. :D (n/t) by williamashbless2005-10-06 09:29:24
    What is that? by Didactylos2005-10-06 09:39:41
      it is a book by onur2005-10-06 10:17:22
        Optimal memory usage aside...its probably not that by williamashbless2005-10-06 10:21:48
        I know it's not your fault, by Didactylos2005-10-06 10:42:11
          so then by onur2005-10-06 10:47:29
            It's a valid interpretation. by wheresthefish2005-10-06 10:49:52
            Yes. by Didactylos2005-10-06 10:58:23
              aieee javascript by onur2005-10-06 11:17:01
      I think that his point, while poorly stated, was by Schol-R-LEA;22005-10-06 10:34:39
    Hey Onur... couple questions by threadjacker2005-10-06 09:46:20
      hi threadjacker by onur2005-10-06 10:12:00
        w00t! Best advice I've heard today! :D (n/t) by williamashbless2005-10-06 10:15:26

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)