documentation that makes me laugh

- (void)finalize

Called by the garbage collector when the receiver is not referenced by other objects.

Note: Garbage collection is not available for use in Mac OS X v10.4, nor in earlier versions.

The garbage collector invokes this method on the receiver before disposing of the memory it uses. When garbage collection is enabled, this method is invoked instead of dealloc.

Available in Mac OS X v10.4 and later.

Tags: , ,

17 Responses:

  1. Perhaps they're preparing to roll out garbage collection in 10.4.x or 10.5?

    • jwz says:

      Maybe (I doubt it) but it's still a pretty goofy way of writing it:

      • This does X.
      • No it doesn't. Not available in release Y.
      • Available in: release Y.

      • dossy says:

        Perhaps it's a typo, and meant to say that it's not available in 10.3 and earlier, but it is available in 10.4 and later.

        But yes, it is worth a good chuckle.

      • cacepi says:

        From a story posted on slashdot:

        "We are working on a better implementation for garbage collection than we've seen out there so far, but in the end its a performance hit and an unpredictable time that is not good for some kinds of apps."

        But, of course, doesn't mean that there will be gc in Mac OS X, just that Apple is working on "a better implementation," so your guess is as good as mine.

        • legolas says:

          Now I understand! Any implementation is better than the current one, so Steve is right.

          Hey this could be a good way to sell software! Write documentation that says:
          it does this. (note: currently, it doesn't). And then say you're working on a better version of it.

          Hold on, lemme start:

          I've just written a replacement for word that fit's in a few kb, won't ever crash and actually does more than word.
          (all this functionality is not available in the current version)
          And I'm even working on making word processing work better than what is currently available!

    • Someone needs to haox a mac rumor site into thinking that grabage collection is coming in a 10.4 point release. Perhaps the WSJ will pick it up!

  2. giles says:

    Obviously this was put in there so that renegade robots running OS X can be dealt with, Kirk-style:

    Tell... me about your garbage collector. *drop kick*

  3. pyrop says:

    It's available, just not available for use. (Whatever that means.)

  4. mcfnord says:

    Sometimes technical writers get no respect, and sometimes that's what we deserve.

  5. duskwuff says:

    Garbage collection is said to be planned for 10.5. If you poke around the GCC man page, I think there are some references to it.

    That being said - yes, it's kind of funny to say that the method is "available" in 10.4.

  6. violentbloom says:

    I've done a pathetically large amount of research into java garbage collection recently and can offer these other fine reading materials for increasing your boredom.

    useful with pictures Obviously what I was looking for was called eden. no really.
    sensible sanitation!
    An object is softly reachable if it is not strongly reachable well duh!

    And if I say there's a bug in garbage collection, then I'm right *grumble* I don't make the big programmer bucks, why should I have to find and fix bugs? hmmmmm?

  7. everybody42 says:

    I think what they mean is this:

    • the finalize() method is available since OS X v10.4
    • garbage collection is not avaliable, at least until (including) OS X v10.4
    • garbage collection will invoke the finalize() method once it exists

    No contradiction there if you look at it closely. Maybe it makes sense to implement finalize() already, despite the fact that it's not called in current versions of OS X?

  8. helge5 says:

    Garbage collection is available in combination with the GNU Objective-C runtime (which has Boehm GC support for years):

    And -finalize is what is used for external resource deallocation in libFoundation and gstep-base in case GC is enabled (instead of -dealloc).

    Maybe the mentioned documentation snippet probably just got imported from some GCC manual?