• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful


  • Subject: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • From: glenn andreas <email@hidden>
  • Date: Wed, 6 Feb 2008 09:45:43 -0600


On Feb 6, 2008, at 3:39 AM, John Engelhart wrote:


On Feb 5, 2008, at 7:40 AM, Alastair Houghton wrote:

On 5 Feb 2008, at 00:14, John Engelhart wrote:

I had such high hopes for Cocoa's GC system because once you're spoiled by GC, it's hard to go back.

Unfortunately, the 4-5 months of time I've put in on Leopard's GC system has not been nearly as pleasant. It has been outright frustrating, and it's reached the point where I consider the system untenable.

Honestly, this point has now been answered over and over.

I think it comes down to the fact that you have failed to appreciate that Cocoa GC is designed for easy use with *OBJECTS*. If you're using it with objects, it "just works".

You misunderstand what Objective C is, and how it works. "Objects" is synonymous for "Structs".



If that were true, you'd be able to declare objects as local variables (as opposed to as pointers to structures):


	NSPoint aPoint; // <-- NSPoint = struct, legal
	NSString aString; // <-- NSString = object, Illegal

(yes, at one time there was an attempt to add support for that, but it didn't survive).

Structures don't have "magic invisible members":

@interface Foo {
}
@end

Foo *aFoo;
NSLog(@"Foo is a %@", aFoo->isa);

Notice how there is an "isa" member that is automatically put there, not unlike the way that a C++ object might have a vtable (or other internal plumbing for multiple inheritance).




Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
      • From: John Engelhart <email@hidden>
    • Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: John Engelhart <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: Alastair Houghton <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: John Engelhart <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: Alastair Houghton <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: John Engelhart <email@hidden>)

  • Prev by Date: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Next by Date: Bug in CF/NSString's no-copy constructors (was Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful)
  • Previous by thread: [Moderator] Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Next by thread: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Index(es):
    • Date
    • Thread