Conforms to NSObject
Declared in CC3OSExtensions.h

Overview

Extension to support Cocos3D functionality.

Tasks

Instance Methods

asWeakReference

Returns this object wrapped in a weak reference.

- (id)asWeakReference

Discussion

You can retrieve this original object by invoking the resolveWeakReference on the returned object.

This method is useful when you want to add this object to a collection, but don’t want to create a strong reference to it within the collection, or in any other situation where you want to assign this object to a strong reference, but need to avoid a potential retain cycle.

This implementation creates and returns an NSValue, with this object set as its nonretainedObjectValue.

Declared In

CC3OSExtensions.h

fullDescription

Returns a string containing a more complete description of this object.

- (NSString *)fullDescription

Discussion

This implementation simply invokes the description method. Subclasses with more substantial content can override to provide much more information.

Declared In

CC3OSExtensions.h

resolveWeakReference

When invoked on the object returned by the asWeakReference method, returns the original object. When invoked on any other object, simply returns that object.

- (id)resolveWeakReference

Declared In

CC3OSExtensions.h