In pixelBufferFromImage(UIImageExtension),
CIContext is generated whenever pixelBufferFromImage called.
I recommend to use shared CIContext object(But This isn't just meaning to make single-ton).
Becauase, If CIContext is generated overly then It cause memory issues(zombie object or leak).
So you should use shared CIContext object as possible.
Don't worry about to use shared CIContext object.
This object is thread safe.
In pixelBufferFromImage(UIImageExtension),
CIContext is generated whenever pixelBufferFromImage called.
I recommend to use shared CIContext object(But This isn't just meaning to make single-ton).
Becauase, If CIContext is generated overly then It cause memory issues(zombie object or leak).
So you should use shared CIContext object as possible.
Don't worry about to use shared CIContext object.
This object is thread safe.