Changes

Jump to: navigation, search

An Overview of Objective-C Object Oriented Programming

59 bytes added, 19:39, 14 October 2009
Declaring, Initializing and Releasing a Class Instance
</pre>
In the first step of this section we allocated memory for the creation of the class instance. Good programming conventions dictate that memory allocated to a class instance should be released when the instance is no longer required. Failure to do so can result in memory leaks and such that the application will continue to use up system memory until none is left. Those familiar with Java will be used to relying on the ''garbage collector'' to free up unused memory automatically. Some implementations of Objective-C also has have a garbage collector but it is not implemented on all platforms (the iPhone being a case in point) so you should get into the practice of releasing allocated memory yourself:
<pre>

Navigation menu