---
title: NSDecrementExtraRefCountWasZero
framework: foundation
role: symbol
role_heading: Function
path: foundation/nsdecrementextrarefcountwaszero
---

# NSDecrementExtraRefCountWasZero

Decrements the specified object’s reference count.

## Declaration

```occ
extern BOOL NSDecrementExtraRefCountWasZero(id object);
```

## Parameters

- `object`: An object.

## Return Value

Return Value false if anObject had an extra reference count, or true if anObject didn’t have an extra reference count—indicating that the object should be deallocated (with dealloc).

## Discussion

Discussion Decrements the “extra reference” count of anObject. Newly created objects have only one actual reference, so that a single release message results in the object being deallocated. Extra references are those beyond the single original reference and are usually created by sending the object a retain message. Your code should generally not use these functions unless it is overriding the retain or release methods. Special Considerations This function is deprecated and unavailable for use with ARC.

## See Also

### Object Allocation and Deallocation

- [NSAllocateObject](foundation/nsallocateobject.md)
- [NSCopyObject](foundation/nscopyobject.md)
- [NSDeallocateObject](foundation/nsdeallocateobject.md)
- [NSExtraRefCount](foundation/nsextrarefcount.md)
- [NSIncrementExtraRefCount](foundation/nsincrementextrarefcount.md)
- [NSShouldRetainWithZone](foundation/nsshouldretainwithzone.md)
