Re: Garbage Collection in C



SM Ryan <wyrmwif@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

"Paul Connolly" <pgconnolly@xxxxxxxxxxxxxxxx> wrote:
#
# "SM Ryan" <wyrmwif@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
# message news:12j8dmrsobs4r27@xxxxxxxxxxxxxxxxxxxxx
#
# > Garbage collection + finalisation allows you everything destructors
# > do with fewer restrictions in the language and less work by
# > programmers.
#
# everything? so this garbage collection doesn't use any more memory than hand

Then don't use it.

This involves a technical point of language design. Destructors
were added to C++ because it had no garbage collection. The
result is far more complicated language implementation which
can still has implicit storage management activated.

Destructors do more than releasing memory. And finalisation is not a
good substitute for these tasks as finalisation is not synchronous.

Yours,

--
Jean-Marc
.



Relevant Pages

  • Re: Garbage Collection in C
    ... #> Garbage collection + finalisation allows you everything destructors ... #> programmers. ... so this garbage collection doesn't use any more memory than hand ... This involves a technical point of language design. ...
    (comp.lang.c)
  • Re: Garbage Collection - Stop Making Trash
    ... >> cases that require garbage collection. ... > figuring out why anyone would want to perturb a language like ... There are also many programmers who do not desire it. ... Reread and try again. ...
    (comp.lang.cpp)
  • Re: type checking
    ... >it's not far from your favourite SWIG-supported language. ... when its constructor raised an exception. ... It hasn't really been an issue so far, but I guess C# constructors ... This is one issue I already have with Java/C# style garbage collection ...
    (comp.lang.python)
  • Re: Why C# and Java have got it wrong
    ... But I agree that garbage collection in Java and C# is a problem: ... For example, C++, which I love and hate, is not a language well ... work force on almost any real-world project, and much of the reason ... for that complexity is that C++ is not designed with GC in mind. ...
    (comp.programming)
  • Re: Destructor: not gauranteed to be called?
    ... > implementation detail for destructors in C++. ... Destruction is a language ... Resource automatic freeing (mainly memory), ... The problem is that most developper know about finalizers (which ...
    (microsoft.public.dotnet.languages.vc)