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
  Will the templated by Didactylos 2005-10-06 09:48:42
value be handled differently? Assuming the stream handling is fine (I can't see any problem, but that means nothing) first thing I would do is test it without the template.

I'm no template expert, but it seems likely that the return value is going on the heap, and needs freeing. That would fit with an int. I can't recall using templates with value types, although I'm sure I must have. Anyway, a couple of quick tests should prove it one way or the other.
[ Reply ]
    Return value's on the stack, like any other. by williamashbless2005-10-06 09:53:20

 

[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.)