<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSExtraRefCount",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@F@NSExtraRefCount"
  },
  "title" : "NSExtraRefCount"
}
-->

# NSExtraRefCount

Returns the specified object’s reference count.

```
extern NSUInteger NSExtraRefCount(id object);
```

## Parameters

`object`

An object.

## Return Value

The current reference count of `object`.

## Discussion

This function is used in conjunction with [`NSIncrementExtraRefCount`](/documentation/Foundation/NSIncrementExtraRefCount) and [`NSDecrementExtraRefCountWasZero`](/documentation/Foundation/NSDecrementExtraRefCountWasZero) in situations where you need to override an object’s <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-c.protocol/retain> and <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-c.protocol/release> methods.

### Special Considerations

This function is deprecated and unavailable for use with ARC.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)