Access Keys:
Skip to content (Access Key - 0)

Kobold2D™ Documentation

The All-In-One, Ready-To-Go development solution for cocos2d-iphone developers. Open source, ARC enabled, for iOS & Mac OS.

Switch to: Japanese Documentation

Level Up!

The Learn Cocos2D Book

Line-Drawing Game Starterkit

Excellent template code for creating your own Line-Drawing game, similar to popular titles such as Flight Control, Harbor Master, and Pirate Bay.

The iPhone RPG Engine

Rapidly create your own RPG or action-adventure game with this complete starter kit. Includes an ebook, game source code and a royalty-free art package.

This guide will introduce you to automatic reference counting (ARC). ARC is fully supported by Kobold2D and enabled by default in all template projects. If you start a new Kobold2D project, you're already using ARC. Of course you can disable ARC but you shouldn't really need to.

This guide also explains what you need to be aware of when interfacing with C or C++ libraries (ie. Chipmunk, Box2D) in an ARC-enabled project.

Kobold2D has automatic reference counting (ARC) enabled by default.
What is ARC?

How Apple describes ARC:

Automatic Reference Counting (ARC) for Objective-C makes memory management the job of the compiler. By enabling ARC with the new Apple LLVM compiler, you will never need to type retain or release again, dramatically simplifying the development process, while reducing crashes and memory leaks. The compiler has a complete understanding of your objects, and releases each object the instant it is no longer used, so apps run as fast as ever, with predictable, smooth performance.

Kobold2D ARC Documentation
More about ARC

If you want to understand in layman's terms how ARC works, you should read this question on stackoverflow.com: How does the new automatic reference counting mechanism work?

If you're totally into the nitty-gritty technical details of ARC you might want to read the LLVM compiler's Automatic Reference Counting documentation.

Mike Ash has summarized how ARC works with many practical examples.

On a higher level, Wikipedia tells us what reference counting actually is and how it works.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Adaptavist Theme Builder Powered by Atlassian Confluence