Yeah, but you did say you wrote your own RAII wrappers.
Ah, unless you don't have access to C++0x, don't use auto_ptr. It's dangerous and deprecated. In C++0x and forward, you should use unique_ptr instead.
Printable View
Yes, and RAII is an important part. But the wrapper is another important part, i.e., a further level of abstraction.Quote:
Originally Posted by Elysia
True that, but was it worth time investigating in? It hardly seems like a thing a newbie would need.
Custom deleters are hardly things that a newbie would need. Is it worth time investigating them? In my opinion, this depends on the path of learning that the newbie wishes to take. Seeing that darren78 started thinking about files, thinking about databases is along similiar lines.Quote:
Originally Posted by Elysia
But then it becomes a question of what is better - custom RAII wrappers or just custom deleters? Since custom deleters usually provide less work, they're more newbie friendly and integrates well with the STL.