ColorKit, when using dominantColors(algorithm: .kMeansClustering) memory error
I'm using this function on each image of a video feed, and after a few seconds/tens of second, my program stops with this error, EXC_BAD_ACCESS (code=1, address=0xd833deece4d0). I assume it comes from this function and precisely kMeansClustering, because I don't encounter this issue using .iterative algorithm
I haven't been able to reproduce this issue. Are you sure that you're releasing the images after processing them?
Decoupled private func kMeansClustering(image: NSImage, colorsCount: Int = 8) throws -> [NSColor] to be used separately within the macOS project without the whole library. When we invoke the method to often, than we get a crash mentioned above

- Row with the CIKMeans algorithm (ColorKit)
- Row with a custom implementation (Not from ColorKit)
- Row with .iterative algorithm (ColorKit)
