• 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: Obj-C++ Tuturial Anywhere?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Obj-C++ Tuturial Anywhere?


  • Subject: RE: Obj-C++ Tuturial Anywhere?
  • From: "Todd Blanchard" <email@hidden>
  • Date: Wed, 15 Aug 2001 15:03:12 -0700

Sure - here is my guidelines.

1) Minimize the use of C++ constructs as much as possible - zero is ideal.
2) Don't export C++ interfaces in your frameworks - only export Objective C
wrappers.
3) When considering the use of templates, see 1.
4) Ditto operator overloading.
5) The only other good use might be the following "smart releasing pointer"
class:

class Id
{
id _object;
Id(id obj) : _object([obj retain]) {}
~Id() { [_object release]; }
operator id() { return _object; }
}

...
{
Id foo = [MyClass newObject];

} // destructor releases foo

This might not work though - I haven't tried it as I don't have the new
thingy.


-----Original Message-----

  • Follow-Ups:
    • Re: Obj-C++ Tuturial Anywhere?
      • From: Andreas Monitzer <email@hidden>
References: 
 >Obj-C++ Tuturial Anywhere? (From: "Jeff Szuhay" <email@hidden>)

  • Prev by Date: Re: Mac OS X 10.1 Dock Menu Description and APIs
  • Next by Date: Re: EOF Advocacy, Open Source?
  • Previous by thread: Obj-C++ Tuturial Anywhere?
  • Next by thread: Re: Obj-C++ Tuturial Anywhere?
  • Index(es):
    • Date
    • Thread