Memory Checker Tools For C++? 398
An anonymous reader writes "These newfangled memory-managed languages like Java and C# leave an old C++ dev like me feeling like I am missing the love. Are there any good C++ tools out there that do really good memory validation and heap checking? I have used BoundsChecker but I was looking for something a little faster. For my problem I happen to need something that will work on Windows XP 64. It's a legacy app so I can't just use Boosts' uber nifty shared_ptr. Thanks for any ideas."
I've used... (Score:2, Funny)
Re:Duh! (Score:5, Funny)
Re:I've used... (Score:5, Funny)
Memory checkers? GARBAGE COLLECTORS?! Have you no HONOR?!
We are KLINGON. We need no checkers. We need no garbage collectors. We need none of these weak HUMAN facilities. We write our CODE from the COMMAND LINE:
> COPY CON DECAPITATOR.EXE
[Alt+077] [ALT+090] . . .
Re:Boost? Ugh (Score:3, Funny)
How about some Reverse Polish (aka postfix): v1 v2 +
Gets rid of all those pesky parentheses, simplifies the syntax. What's not to like, unless you're a LISP fan? ;)
For grep's sake, you could, oh, I dunno, use comments? v1 v2 +; //vectorAdd
Or, maybe write out the function name? v1.operator+(v2);
Possibly even specify the class name too? Not sure of the exact syntax, perhaps: Vector::v1.operator+(v2) or v1.Vector::operator+(v2). If postfix was allowed, maybe: v1 v2 Vector::operator+();
Oh, and are you not a fan of OOP, which I thought was the whole point of C++? Otherwise shouldn't your example be v1.vectorAdd(v2) ?
Don't use pointer arithmetic? (Score:3, Funny)
But why use C++ if you're not using pointer arithmetic? If you're not doing that, go to Java. I know this sounds silly, and it opens religious issues, but (aside from legacy apps, like this one) why would I want to use C++ if I'm not doing that?
I use C because it's small, fast, convenient and portable. I can code something tiny quickly.
I use Java because it's an object oriented language that helps with complex app coding.
I use C++ because I want some of that Java stuff, but I want it to bind to my memory model more realistically. ie. Pointer arithmetic.
Use FORTRAN (Score:2, Funny)