 			}
 		}
 		
-		allClasses.deallocate(capacity: Int(numberOfRegisteredClasses))
+		allClasses.deallocate()
 		
 		return matches
 	}

		
	}
	
	public func allSubclasses() -> [T.Type] {
		let matches = allSubclassesAsAnyObject()
		

		let numberOfRegisteredClasses = objc_getClassList(nil, 0)
		let allClasses = UnsafeMutablePointer<AnyClass?>.allocate(capacity: Int(numberOfRegisteredClasses))
		let autoreleasingAllClasses = AutoreleasingUnsafeMutablePointer<AnyClass>(allClasses)
		
		let actualNumberOfClasses = objc_getClassList(autoreleasingAllClasses, numberOfRegisteredClasses)
		
		let iterationCount = actualNumberOfClasses < numberOfRegisteredClasses ? actualNumberOfClasses : numberOfRegisteredClasses
		
		for i in 0..<iterationCount {
			if let currentClass = allClasses[Int(i)] {
				let superclass: AnyClass? = class_getSuperclass(currentClass)
				
