Abstract
So far, we’ve created new objects in two different ways. The first way is [SomeClass new], and the second is [[SomeClass alloc] init]. These two techniques are equivalent, but the common Cocoa convention is to use alloc and init rather than new. Typically, Cocoa programmers use new as training wheels until they have enough background to be comfortable with alloc and init. It’s time for your training wheels to come off.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2009 Mark Dalrymple and Scott Knaster
About this chapter
Cite this chapter
Dalrymple, M., Knaster, S. (2009). Object Initialization. In: Learn Objective-C on the Mac. Apress. https://doi.org/10.1007/978-1-4302-1816-6_10
Download citation
DOI: https://doi.org/10.1007/978-1-4302-1816-6_10
Publisher Name: Apress
Print ISBN: 978-1-4302-1815-9
Online ISBN: 978-1-4302-1816-6
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)