Hi guys,
Im getting memory allocation problem when im checking allocations through instruments.
the code is:
float yCoordinateStartLocation = 12.5;
float yCoordinateStartLocationValue = 8;
float rowHeight = 20;
float imageHeight = 27;
float xCoordinateStartLocatioForLabel = 60;
float xCoordinateStartLocatioForValue = 190;
float labelWidth = 120;
float imageWidth = 105;
float statusLabelWidth = 95;
float statusLabelHeight = 20;
float xCoordinateStartLocatioForStatusLabel = 6;
float yCoordinateStartLocationForStausLabel = 3;
UIFont* totalFont = [UIFont boldSystemFontOfSize:15];
UIColor* valueColor = [UIColor blackColor];
UIColor* labelColor = [UIColor whiteColor];
UILabel *balanceDueLabel = [[UILabel alloc] initWithFrame:CGRectMake(xCoordinateStartLocatioForLabel, yCoordinateStartLocation, labelWidth, rowHeight)];//showing memory allocation in this line.
balanceDueLabel.backgroundColor = [UIColor clearColor];
[balanceDueLabel setFont:totalFont];
balanceDueLabel.textColor=valueColor;
balanceDueLabel.numberOfLines = 1;
balanceDueLabel.text = @"Balance Due :";
balanceDueLabel.textAlignment=UITextAlignmentRight;
[elementView addSubview:balanceDueLabel];
[balanceDueLabel release];
Can anyone suggest me how to solve this.
Anyone's help will be much appreciated. Thank you, Monish.