auto_ptr with arrays
#3
I've replaced the auto_ptr usage for char arrays in the branch. I won't be porting that to the trunk, 'cause I think the branch is now in a much better shape than the trunk Wink

As for not using auto_ptr at all, I tend to disagree. It's much safer using it than not using anything at all, and it's safe enough in our context so that nothing else needs to be used.
The only reason we're using auto_ptr is its ability to delete data unless explicitly told not to. This coincides with our algorithms, producing data in buffers and throwing away those buffers if anything goes wrong. Since we're not using exceptions at all, exception safety is something we should be too concerned about - we know about them, alright, but we don't handle them anyway, so any exception will basically crash MCS, no point in deallocating memory before the crash Smile
Reply
Thanks given by:


Messages In This Thread
auto_ptr with arrays - by FakeTruth - 05-21-2012, 05:51 AM
RE: auto_ptr with arrays - by xoft - 05-21-2012, 06:20 AM
RE: auto_ptr with arrays - by xoft - 05-23-2012, 03:57 AM



Users browsing this thread: 1 Guest(s)