# NSProxy class reference

richard@brainstorm.co.uk
Generated at 2025-12-02 21:52:00 +0000
1997 Free Software Foundation, Inc.
Software documentation for the NSProxy class
Foundation/NSProxy.h

The NSProxy class provides a basic implementation of a class whose instances are used to stand in for other objects.
The class provides the most basic methods of NSObject, and expects messages for other methods to be forwarded to the real object represented by the proxy. You must subclass NSProxy to implement -forwardInvocation: to these real objects.

Note that `NSProxy` is a different sort of class than others in the GNUstep Base library in that it is the only example of a root class besides NSObject . Thus, it implements the `NSObject` protocol but is not a subclass of NSObject.

Description forthcoming.
alloc
Allocates and returns an NSProxy instance in the default zone.
allocWithZone:
z
Allocates and returns an NSProxy instance in the specified zone z.
autorelease
Returns the receiver.
class
Returns the receiver.
description
Returns a string describing the receiver.
isKindOfClass:
aClass
Returns `NO`... the NSProxy class cannot be an instance of any class.
isMemberOfClass:
aClass
Returns `YES` if aClass is identical to the receiver, `NO` otherwise.
load
A dummy method...
release
A dummy method to ensure that the class can safely be held in containers.
respondsToSelector:
aSelector
Returns `YES` if the receiver responds to aSelector, `NO` otherwise.
retain
Returns the receiver.
retainCount
Returns the maximum unsigned integer value.
autorelease
Adds the receiver to the current autorelease pool and returns self.
class
Returns the class of the receiver.
conformsToProtocol:
aProtocol
Calls the -forwardInvocation: method to determine if the 'real' object referred to by the proxy conforms to aProtocol. Returns the result.
NB. The default operation of -forwardInvocation: is to raise an exception.
dealloc
Frees the memory used by the receiver.
description
Returns a text description of the receiver.
forwardInvocation:
anInvocation
Raises an `NSInvalidArgumentException`.
hash
Returns the address of the receiver... so it can be stored in a dictionary.
init
Initialises the receiver and returns the resulting instance.
isEqual:
anObject
Tests for pointer equality with anObject.
isKindOfClass:
aClass
Calls the -forwardInvocation: method to determine if the 'real' object referred to by the proxy is an instance of the specified class. Returns the result.
NB. The default operation of -forwardInvocation: is to raise an exception.
isMemberOfClass:
aClass
Calls the -forwardInvocation: method to determine if the 'real' object referred to by the proxy is an instance of the specified class. Returns the result.
NB. The default operation of -forwardInvocation: is to raise an exception.
isProxy
Returns `YES`.
methodSignatureForSelector:
aSelector
If we respond to the method directly, create and return a method signature. Otherwise raise an exception.
release
Decrement the retain count for the receiver... deallocate if it would become negative.
respondsToSelector:
aSelector
If we respond to the method directly, return `YES`, otherwise forward this request to the object we are acting as a proxy for.
retain
Increment the retain count for the receiver.
retainCount
Return the retain count for the receiver.
self
Returns the receiver.
superclass
Returns the superclass of the receiver's class.
zone
Returns the zone in which the receiver was allocated.