I am allocating memory in the class method initialize:
UIColor * customBlue;
UIColor * customRed;
@implementation UIColorConstants
+ (void)initialize{
if ( self == [UIColorConstants class] ) {
customBlue = [[UIColor alloc]initWithRed:0 green:0.137 blue:0.584 alpha:1];
customRed = [[UIColor alloc]initWithRed:.91 green:0.067 blue:0.176 alpha:1];
}
}
+ (UIColor *)getCustomRed{
return customRed;
}
+ (UIColor *)getCustomBlue{
return customBlue;
}
@end
Where is the best / correct place to release the allocated memory since there is no counterpart to initialize called automatically?