Up
Authors
- Andrew Kachites McCallum (
mccallum@gnu.ai.mit.edu)
-
Version: 33774
Date: 2011-08-22 05:02:10 -0600 (Mon, 22 Aug 2011)
Copyright: (C) 1995, 1996, 1998 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSObject.h
Availability: Not in OpenStep/MacOS-X, Base Likely to be changed/moved/removed at 1.17.0
Some non-standard extensions mainly needed for backwards
compatibility and internal utility reasons.
Method summary
+ (void)
enableDoubleReleaseCheck: (BOOL)enable;
Availability: Not in OpenStep/MacOS-X, Base Likely to be changed/moved/removed at 1.17.0
Enables runtime checking of
retain/release/autorelease
operations.
Whenever either
-autorelease
or -release
is
called, the contents of any autorelease pools
will be checked to see if there are more outstanding
release operations than the objects retain count.
In which case an exception is raised to say that the
object is released too many times.
Beware, since this feature
entails examining all active autorelease pools
every time an object is released or autoreleased,
it can cause a massive performance degradation... it
should only be enabled for debugging.
When you are having memory allocation problems, it
may make more sense to look at the memory allocation
debugging functions documented in NSDebug.h, or
use the NSZombie features.
- Declared in:
- Foundation/NSObject.h
Availability: Not in OpenStep/MacOS-X
Methods for compatibility with the NEXTSTEP
(pre-OpenStep) 'Object' class.
Method summary
- (id)
error: (const char*)aString
,...;
Availability: Not in OpenStep/MacOS-X
Logs a message.
Deprecated. Use
NSLog()
in new code.
- Declared in:
- Foundation/NSObject.h
Availability: OpenStep
Declares some methods for sending messages to self
after a fixed delay. (These methods are in
OpenStep and OS X.)
Method summary
+ (void)
cancelPreviousPerformRequestsWithTarget: (id)obj;
Availability: OpenStep
Cancels any perform operations set up for the
specified target in the current run loop.
+ (void)
cancelPreviousPerformRequestsWithTarget: (id)obj
selector: (SEL)s
object: (id)arg;
Availability: OpenStep
Cancels any perform operations set up for the
specified target in the current loop, but only if
the value of aSelector and argument with which the
performs were set up match those supplied.
Matching of the argument may be either by pointer
equality or by use of the
[NSObject -isEqual:]
method.
- (void)
performSelector: (SEL)s
withObject: (id)arg
afterDelay: (
NSTimeInterval)seconds;
Availability: OpenStep
Sets given message to be sent to this instance after
given delay, in any run loop mode. See
NSRunLoop
.
- (void)
performSelector: (SEL)s
withObject: (id)arg
afterDelay: (
NSTimeInterval)seconds
inModes: (
NSArray*)modes;
Availability: OpenStep
Sets given message to be sent to this instance after
given delay, in given run loop
modes. See
NSRunLoop
.
- Declared in:
- Foundation/NSObject.h
Availability: Not in OpenStep/MacOS-X
The NSDiscardableContent protocol is used by objects
which encapsulate data which may be discarded if
resource constraints are exceeded. These constraints
are typically, but not always, related memory.
Method summary
- (BOOL)
beginContentAccess;
Availability: Not in OpenStep/MacOS-X
This method is called before any access to the object.
It returns
YES if the object's content is
still valid. The caller must call
-endContentAccess
once for every call to
-beginContentAccess
;
- (void)
discardContentIfPossible;
Availability: Not in OpenStep/MacOS-X
Discards the contents of the object if it is not
currently being edited.
- (void)
endContentAccess;
Availability: Not in OpenStep/MacOS-X
This method indicates that the caller has finished
accessing the contents of the object adopting
this protocol. Every call to
-beginContentAccess
must be be paired with a call to this method after the
caller has finished accessing the contents.
- (BOOL)
isContentDiscarded;
Availability: Not in OpenStep/MacOS-X
Returns
YES if the contents of the
object have been discarded, either via a call to
-discardContentIfPossible
while the object is not in use, or by some
implementation dependent mechanism.
- Declared in:
- Foundation/NSObject.h
Availability: OpenStep
The NSObject protocol describes a minimal set of methods
that all objects are expected to support. You should be
able to send any of the messages listed in this protocol
to an object, and be safe in assuming that the receiver
can handle it.
Up