Set iterator and range detach operations to noop

Leave the housekeeping to the NSHashTable itself, which should purge
null-references automatically (not necessarily right away)

Also update tests accordingly: Use `allObjects.count` instead of simply
`count` on the NSHashTable, since `allObjects.count` returns non-null
references.

This should fix #36
This commit is contained in:
iska
2019-08-06 21:26:21 +02:00
parent 1dda2921fe
commit 153d48c19c
3 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -141,7 +141,7 @@
- (void)detachNodeIterator:(HTMLNodeIterator *)iterator
{
[_nodeIterators removeObject:iterator];
// NOOP
}
#pragma mark - Ranges
@@ -153,7 +153,7 @@
- (void)detachRange:(HTMLRange *)range
{
[_ranges removeObject:range];
// NOOP
}
- (void)didRemoveCharacterDataInNode:(HTMLCharacterData *)node atOffset:(NSUInteger)offset withLength:(NSUInteger)length