Reply to post: Re: not-so-smart with pointers

Carnegie-Mellon Uni emits 'don't be stupid' list for C++ developers

Ken Hagan Gold badge

Re: not-so-smart with pointers

"[resource management] was invented specifically for programmers who couldn't handle memory management correctly"

Really, I thought it was because files aren't memory, database transactions aren't memory, network connections aren't memory, windows aren't memory, graphics contexts aren't memory, function hooks and callbacks aren't memory, ...

You are talking utter crap. The word "resource" is used here because exactly the same code can be used to manage just about anything that needs to be properly disposed of at some later point in time and you know, at the time of "acquisition", when and how that disposal ought to be done. That description applies to a huge range of use-cases, only a tiny fraction of which are related to memory management.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019