Permalink
Browse files

- fix memory leaks in the pie charts

  • Loading branch information...
Bruno Bierbaumer
Bruno Bierbaumer committed Sep 17, 2011
1 parent 78a6270 commit 041de476149bfb2be1073ec9d1adc01b74661d7b
Showing with 20 additions and 4 deletions.
  1. +13 −4 iOSPlot/PCHalfPieChart.m
  2. +7 −0 iOSPlot/Shared/PCPieChart.m
View
@@ -59,6 +59,13 @@ - (NSString*)description
return text;
}
+- (void)dealloc
+{
+ [colour release];
+ [title release];
+ [super dealloc];
+}
+
@end
@implementation PCHalfPieChart
@@ -196,10 +203,12 @@ - (void)drawRect:(CGRect)rect
- (void)dealloc
{
- [self.title release];
- [self.subtitle release];
- [self.titleFont release];
- [self.subtitleFont release];
+
+ [title release];
+ [subtitle release];
+ [components release];
+ [titleFont release];
+ [subtitleFont release];
[super dealloc];
}
@@ -61,6 +61,13 @@ - (NSString*)description
return text;
}
+- (void)dealloc
+{
+ [colour release];
+ [title release];
+ [super dealloc];
+}
+
@end
@implementation PCPieChart

0 comments on commit 041de47

Please sign in to comment.