             return
         }
         
-        self.headersAttributes.removeAllObjects()
-        self.footersAttributes.removeAllObjects()
+        self.headersAttributes.removeAll()
+        self.footersAttributes.removeAll()
         self.unionRects.removeAll()
         self.allItemAttributes.removeAll()
         self.sectionItemAttributes.removeAll()

        self.sectionInset = UIEdgeInsets.zero
        self.itemRenderDirection =
            CHTCollectionViewWaterfallLayoutItemRenderDirection.chtCollectionViewWaterfallLayoutItemRenderDirectionShortestFirst
        
        headersAttributes = NSMutableDictionary()
        footersAttributes = NSMutableDictionary()

        super.init(coder: aDecoder)
    }

            if footerHeight > 0 {
                attributes = UICollectionViewLayoutAttributes(forSupplementaryViewOfKind: CHTCollectionElementKindSectionFooter, with: IndexPath(item: 0, section: section))
                attributes.frame = CGRect(x: 0, y: top, width: self.collectionView!.bounds.size.width, height: footerHeight)
                self.footersAttributes.append(attributes)
                self.allItemAttributes.append(attributes)
                top = attributes.frame.maxY
            }
