quote:The most obvious being, of course, automatic garbage collection, but others further complicating that.
I''ve heard of automatic garbage collection, but what is it?
-----------------------------------------------
Here comes the Thnikkaman!
quote:The most obvious being, of course, automatic garbage collection, but others further complicating that.
Object* MakeAnObject(bool WithThisParameter){ return new Object(WithThisParameter);}
quote:Original post by Etnu
Simple.
In C++, if I have a function that looks like this:
Object* MakeAnObject(bool WithThisParameter){ return new Object(WithThisParameter);}
There is nothing that is guaranteed to free the newly allocated memory. In short - you get a memory leak.
You don''t have that issue with garbage-collected languages, because they automatically free any memory that''s not being used ("dead" objects).
It''s a decent idea, but it takes a way quite a bit of flexibility (though, granted, it''s more of a speed concern than a flexibility one).
quote:Original post by YohomythBased on one reply out of 32? You sure are sensitive.
What the hell? I started this topic to get ideas to help my friend who is attempting to make a compiler, and it''s turned into a place for people who think it would be evil if C++ was a little easier.
quote:
Original post by Andrew Russell
C++ is so great because it isn''t bogged down with the unnecessary.
quote:Original post by Etnu
Simple.
In C++, if I have a function that looks like this:
Object* MakeAnObject(bool WithThisParameter){ return new Object(WithThisParameter);}
There is nothing that is guaranteed to free the newly allocated memory. In short - you get a memory leak.
quote:
You don''t have that issue with garbage-collected languages, because they automatically free any memory that''s not being used ("dead" objects).