What if Garbage Collection was like Garbage Collection?

Every Thursday morning at 6:00am, the garbage truck stops in front of your house. A scruffy man in an orange jumpsuit steps down, walks up to your front door, and lets himself in. 

He walks around the house, picking up each item you own, and asks, "Are you still using this?" If you don't say "yes", he carts it away.

Comments

  • Anonymous
    December 03, 2004
    "The garbage man can! Yes the garbage man can!"

    What about the other way around (computer garbage collection more like real life garbage collection)? What if you had if you had to add all items you were done with to a "garbage can," and periodically move the garbage outside to be deleted or recycled by the garbage collector. You'd have the problems of deterministic finalization and garbage collection combined! How fun!
  • Anonymous
    December 03, 2004
    What if your garbage collection routines actually had the sophistication of an advanced AI and only externally did simple garbage collection as we know it, but was internally working on the final details of the Unified Theory.

    Dilbert reference, anyone? :)
  • Anonymous
    December 03, 2004
    What if your garbage collector comes in to do the job every 1-5 minutes interval, and keep asking you "are you using this? are you using that?" and you just have to keep saying "Yes, yes yes yes..."
  • Anonymous
    December 04, 2004
    The comment has been removed
  • Anonymous
    December 04, 2004
    I think it should be more like this....

    He walks around the house, picks up each item you own, and notices that you haven't used those items since:
    1. He can determine that you brain has no memory about those items at all (even in your brain tumor) or
    2. You destroyed it by tearing it out like you tear archaic credit card statements or
    3. You haven't used it in age and you mark that you don't use it any more

    He can come as many as you like (GC.Collect) but he has a garbage alarm signal to alert whether your house is full of sh*t so he can come on his own as well. Every time he comes to your house, you will be a little bit interrupted since he walks around so that you can't concentrate very well :)

    Another good thing is that the garbage man will ask you if you want to give a farewell or final words to each object before he takes it away if you say so (.Finalize())

    Only bad thing is that he never asked you specifically which piece to collect or not. And you cannot force him to pick up any specific items each time he comes; you can only tell him to come to your house to clean up.... He might not pick up anything if you still have some memory or thinking about that item.
  • Anonymous
    December 04, 2004
    In the words of my favorite sanitation commisioner "Can't somone else do it?"

    I'm assuming this was just a fun rambling? I'm always wary of "real-life" analogies - They can be good explanitory help, but almost always lead you down the wrong path if you start basing decisions or arguments on them...

  • Anonymous
    December 06, 2004
    This actually isn't all that far fetched. There is a really neat type of analysis that can be done on programs called "shape analaysis" that can detect places in a program where deterministic finalization can be inserted. Its not perfect, and it won't every thing, but it can find a lot.

    It is an expensive analysis, so it isn't something that you would want to build into a JIT compiler, but it could be placed into the front end .NET compilers (C#, VB, C++) and inject meta data about its results into the IL that the JIT compiler uses.
  • Anonymous
    December 06, 2004
    What about the yicky stuff that drips out or the little itty bits of paper that fall by the way-side...

  • Anonymous
    December 06, 2004
    The comment has been removed
  • Anonymous
    February 01, 2005
    What if Garbage Collection was like Garbage Collection?...
  • Anonymous
    June 16, 2009
    PingBack from http://fixmycrediteasily.info/story.php?id=14380