• 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
alloc ... initWith ... malloc and NSObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

alloc ... initWith ... malloc and NSObject


  • Subject: alloc ... initWith ... malloc and NSObject
  • From: email@hidden
  • Date: Sun, 12 Jun 2005 02:52:31 +0100
  • Priority: normal

Hi all,

I have a class called MyScene that shall hold an array of objects
called MyPolygon. MyPolygon is derived from NSObject and have
the following function:

- (id)initWithVertexCount:(int)vertexCount;

I also need to create an array of MyPolygon objects in MyScene
at the following location:
- (id)initWithPolygonCount:(int)polygonCount;

Now the problem is how do I create an array of MyPolygon
objects without using NSMutableArray but perhaps using malloc
and yet still manage to call the initWithVertexCount method?

Please help! Thank you.

Ganesan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: alloc ... initWith ... malloc and NSObject
      • From: Prachi Gauriar <email@hidden>
  • Prev by Date: Re: NSMutableDictionary setObject:forKey:
  • Next by Date: Re: NSMutableDictionary setObject:forKey:
  • Previous by thread: Wake from Sleep
  • Next by thread: Re: alloc ... initWith ... malloc and NSObject
  • Index(es):
    • Date
    • Thread