E
eiji
Hi folks,
I found this code in a project:
Basicly this ends up in the same result like
So is there a real benefit of the first version, and I have no idea?
I think the first ends up in slower code!?
Does a good compiler optimize the first case into the second?
And last but not least, have a look at this:
somePtr t* = new somePtr( );
....
delete t;
t = NULL;
I know, NULL is windows style, but is that necessary?
Thanks a lot!!
Regards,
Sascha
I found this code in a project:
class TestList : public std::vector<Test> { /*empty!!!*/ };
Basicly this ends up in the same result like
typedef std::vector<Test> TestList; ?
So is there a real benefit of the first version, and I have no idea?
I think the first ends up in slower code!?
Does a good compiler optimize the first case into the second?
And last but not least, have a look at this:
somePtr t* = new somePtr( );
....
delete t;
t = NULL;
I know, NULL is windows style, but is that necessary?
Thanks a lot!!
Regards,
Sascha