@TDS the issue is that because of this allocation `unsigned char *rawData = (unsigned char*) calloc(height * width * 4, sizeof(unsigned char));` which is done once every 2 secs... I have memory leak (it allocates about 3 Mb). But when I free the allocated region of memory and allocate it again to write new data, it after the part where `CGContextRef context = CGBitmapContextCreate(rawData, width, height,
bitsPerComponent, bytesPerRow, colorSpace,
kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);` new data should be written actually the data remains the same as previous time....