Knowing When to Let Go: Better Living Through Memory Management
Subject:   is simpler slower?
Date:   2003-06-12 21:54:15
From:   anonymous2
The following algorithm is used in the The Objective-C Programming Language document from the Apple developer's site. Although the code is a little simpler then creating a temporary variable for nothing more than a placeholder for an object you're going to release, I'm not sure that it gives you a net gain in efficiency. Does the extra overhead from the "autorease" outway the penalty involved in creating an extra variable?

[friend autorelease]; // friend is an ivar
friend = [aFriend retain];

1 to 1 of 1
  1. is simpler slower?
    2003-06-12 22:07:15  iapole [View]

    • is simpler slower?
      2003-06-20 18:05:46  anonymous2 [View]

    • is simpler slower?
      2003-06-13 14:27:00  anonymous2 [View]

      • is simpler slower?
        2003-06-13 20:52:04  iapole [View]

        • is simpler slower?
          2003-06-15 21:29:50  anonymous2 [View]

          • is simpler slower?
            2003-06-16 16:11:16  iapole [View]

1 to 1 of 1