#import <CC3OSExtensions.h>
Instance Methods | |
(id) | - asWeakReference |
(NSString *) | - fullDescription |
(id) | - resolveWeakReference |
Extension to support Cocos3D functionality.
- (id) asWeakReference |
Returns this object wrapped in a weak reference.
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.
- (NSString*) fullDescription |
Returns a string containing a more complete description of this object.
This implementation simply invokes the description method. Subclasses with more substantial content can override to provide much more information.
Reimplemented in CC3ShaderProgram, CC3Identifiable, and <CC3ParticleProtocol>.
- (id) 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.