title: How to make a weak reference set in Swift
body: <p>NSSet holds strong references to its objects so the Objective C solution was to use NSHashTable.weakObjectsHashTable() a la </p>
  
  <pre><code>NSHashTable* mySet = [NSHashTable weakObjectsHashTable];
  [mySet addObject:anyOldObject];
  [mySet count]; //returns 1
  [mySet containsObject:anyOldObject]; //returns true
  </code></pre>
  
  <p>in swift however this does not seem to work</p>
  
  <pre><code>var mySet = NSHashTable.weakObjectsHashTable()
  mySet.addObject(anyOldObject)
  mySet.count //returns 1
  mySet.containsObject(anyOldObject) //returns false
  </code></pre>
  
  <p>What am I missing?  Or is this a bug?</p>