I have my initial variable.
let videoImage:CIImage = CIImage(cvPixelBuffer: pixelBuffer)
I create another buffer likeso.
let newImage:CIImage = self.videoImage
I print them out to look at their memory address
print(videoImage)
print(newImage)
Output:
Optional(<CIImage: 0x280b91260 extent [0 0 1128 1504]>
affine [1 0 0 -1 0 1504] extent=[0 0 1128 1504]
colormatch "QuickTime 'nclc' Video (1,1,6)"_to_workingspace extent=[0 0 1128 1504]
IOSurface 0x28073d990(675) seed:47 BGRA8 extent=[0 0 1128 1504]
)
<CIImage: 0x280b91260 extent [0 0 1128 1504]>
It seems that they have the same memory address. 0x280b91260
Is there a way to create a new variable with the same exact information but with a different memory address?
For example
Optional(<CIImage: 0x280b91260 extent [0 0 1128 1504]>
affine [1 0 0 -1 0 1504] extent=[0 0 1128 1504]
colormatch "QuickTime 'nclc' Video (1,1,6)"_to_workingspace extent=[0 0 1128 1504]
IOSurface 0x28073d990(675) seed:47 BGRA8 extent=[0 0 1128 1504]
)
<CIImage: 0x361a92348 extent [0 0 1128 1504]>
Where the first and second are a copy but the first has a memory address 0x280b91260
and the second 0x361a92348
for example?