Recent Posts
Subscribe
Subscribe to the RSS feed or enter your e-mail in the form below, and get updates, cheatsheets, whitepapers and more.

Your Email:


Posts Tagged ‘memory management’

Great Library For Custom Controls And Easy Memory Management

I’ve found out about a terrific library that allows you to easily implement useful functionality into your apps such as easier memory management, multi-line segmented controls, a special view allowing users to enter ratings, custom progress bars, and many other utility functions with more being added over time.

Check it out here on Github: TouchCustoms

[Via: Under The Bridge]

Share and Enjoy:
  • RSS

Avoid Retain Cycles In Objective-C

Found an excellent set of rules from Matt Gallagher on how to avoid retain cycles in Objective-C. 

Uh-Oh A Class Is Still Retained Somewhere…

A problem that can occur in Objective-C is that when you start sharing objects between classes and increasing the retain count you can end up with a situation where one class inherits from another, and then when you want to release the object does not get released from memory because it is being retained by a class lower down the class hierarchy.

One Basic Rule

Now if this all sounds confusing, Matt explains everything well in his article, and has created a set of 5 rules.  Ultimately it comes down to one basic rule:

Objective-C Dev Programming Tutorial On Memory Management

Something I’ve found with talking to programmers new to Objective-C is that most often the most confusing concept is memory management.

The reason for this is because in Objective-C memory is managed in a different manner from the mainstream languages typically taught in school (C/C++/Java), and introduces new concepts such as the retain count, and auto release pools.