Returns a Boolean value indicating whether the discardable contents are still available and have been successfully accessed.
- iOS 4.0+
- macOS 10.6+
- tvOS 9.0+
- watchOS 2.0+
YES if the discardable contents are still available and have now been successfully accessed; otherwise,
Call this method if the object’s memory is needed or is about to be used. This method increments the counter variable, thus protecting the object’s memory from possibly being discarded. The implementing class may decide that this method will try to recreate the contents if they have been discarded and return YES if the re-creation was successful. Implementors of this protocol should raise exceptions if the
NSDiscardable objects are used when the
begin method has not been called on them.