I am using CGContextRef
.
UIGraphicsBeginImageContext(self.drawImage.frame.size);
CGContextRef context=UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context,0.0f,0.0f,0.0f,1.0f);
UIGraphicsEndImageContext();
CGContextRelease(context);
Do I need to call CGContextRelease(Context);
in the above one.
No.
See The Create Rule vs. The Get Rule:
The Create Rule
Core Foundation functions have names that indicate when you own a returned object:
Object-creation functions that have “Create” embedded in the name; Object-duplication functions that have “Copy” embedded in the name.
[...]
The Get Rule
If you receive an object from any Core Foundation function other than a creation or copy function—such as a Get function—you do not own it [...]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With