Function
GSDistinctParentsOfObjects(_:)GSDistinctParentsOfObjectsGSDistinctParentsOfObjects
Returns a distinct set of parent objects of the given objects.
Declaration
func GSDistinctParentsOfObjects(_ objects: (any NSFastEnumeration)?) -> NSHashTable<AnyObject>?Declaration
NSHashTable *GSDistinctParentsOfObjects(id<NSFastEnumeration>objects);Declaration
GSDistinctParentsOfObjects(objects: object) -> NSHashTableDiscussion
Each object of objects must respond to -parent. If a parent of nil returned, the parent is ignored.
Note that you can iterate over the returned NSHashTable directly instead of converting it to an array first as it holds a strong reference to the parent objects.
Uniqueness of the parent objects is based on their pointer identity; -isEqual: and -hash are not used.
Returns nil if objects is nil to fit along Objective-C message sending semantics.