Garbage Collection

This is a discussion on Garbage Collection within the C++ Programming forums, part of the General Programming Boards category; Hi all, Im looking for a good tutorial that can explain when and where you should deal with global variables ...

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    100

    Garbage Collection

    Hi all,

    Im looking for a good tutorial that can explain when and where you should deal with global variables and pointers so they can be freed correctly.

    Can anyone recommend one?

    Thanks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,773
    The RAII idioim tends to be preferred to garbage collection in C++.

    You could read Implementing the 'Resource Acquisition is Initialization' Idiom by Danny Kalev, or simply search the Web.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. garbage collection enabled c++
    By manav in forum C++ Programming
    Replies: 42
    Last Post: 02-15-2008, 12:42 PM
  2. Garbage Collection is not so complicated
    By Nalpdii in forum C Programming
    Replies: 2
    Last Post: 10-07-2007, 11:34 PM
  3. C++ Garbage Collection
    By vaibhav in forum C++ Programming
    Replies: 1
    Last Post: 11-27-2005, 09:26 AM
  4. Garbage Collection
    By Orborde in forum C++ Programming
    Replies: 4
    Last Post: 05-10-2005, 11:18 PM
  5. garbage collection
    By joed in forum C Programming
    Replies: 4
    Last Post: 04-01-2004, 12:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21