Irrwahn Grausewitz said:
(e-mail address removed) (Paul Hsieh) wrote in
I'd like to know who is responsible of memory recycling [...]
Well, if you call malloc, you must call free, if you call new you must
call delete, if you have a constructor you must have a corresponding
destructor.
Oh dear, didn't you read all the other's replies to his post?
Yes I did. I noticed that none answered the real question of the
author, which is precisely *WHY* I chimed in. Why let this newsgroups
pervasive pedanticness ruin everyone's day?
BTW, there aren't things like 'new' or 'delete' or 'constructors'
or 'destructors' in C!
First of all, the concept of "constructor" and "destructors" are not
unique to C++. The bstring library (
http://bstring.sf.net ) has them,
even in the C interface, for example. They are a programming concept,
as much as a mechanism that C++ has built-in support for. Saying C
doesn't have constructors or destructors is like saying it doesn't
have bubble sort.
Second of all, the the analogy between malloc/free and new/delete is
obvious. For someone interested in the knowlege of both it doesn't
make sense to state something about one and leave out the information
for the other.
[...] and defragmentation in a C/C++ program,
C/C++ does not provide any provisions for any serious defragmentation.
There's no C/C++ language, as others already pointed out.
Yes. And pointing this out has no value to anyone. Let alone
repeating it multiple times.
As far as there's a heap at all... (C does not know about
heaps - the word isn't even mentioned in the standard).
He is not asking questions about the standard. And this is not
comp.std.c. So what relevance does this useless observation have to
anything?
And C doesn't know any of these...
Sorry, I don't want to be rude, but why, for f-words sake,
did you post this reply, presumably ignoring the fact that
there's a charter AND a faq for this NG???
Have you read all the EULAs for all the software you've installed?
Are you a moderator for this newsgroup? Do you think every post in
comp.lang.c follows the charter? Do you think there is any value to
this charter? Do you think the many other posts which did nothing
more than rip into the OP for not following this newsgroups valueless
charter is useful?
So why did I do it? Because I decided not to be a *PRICK*.
[...] (Both of 'em are worth reading, trust me, I'm a musician
Unlikely. I can get a sense of what the charter is from the kind of
crap the regulars post here. That's like asking me to read the
Unibomber's Manifesto to have a more detailed understanding of why he
mailed bombs to people.