---
title: weakObjects()
framework: foundation
role: symbol
role_heading: Type Method
path: foundation/nshashtable/weakobjects()
---

# weakObjects()

Returns a new hash table for storing weak references to its contents.

## Declaration

```swift
class func weakObjects() -> NSHashTable<ObjectType>
```

## Return Value

Return Value A new hash table that uses the weakMemory options and objectPersonality and has an initial capacity of 0.

## See Also

### Convenience Constructors

- [init(options:)](foundation/nshashtable/init(options:).md)
