From f07531d1361e810a63a30f2e3b26313c18b3c302 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sat, 13 Mar 2010 14:43:04 +0000 Subject: Add support for printing the table triggers view as well some HTML generation performance improvements. --- Source/SPTableRelations.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Source/SPTableRelations.m') diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index a88da5e7..7d8ef9e3 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -350,8 +350,7 @@ */ - (NSArray *)relationDataForPrinting { - NSMutableArray *headings = [NSMutableArray array]; - NSMutableArray *tempData = [NSMutableArray array]; + NSMutableArray *headings = [[NSMutableArray alloc] init]; NSMutableArray *data = [NSMutableArray array]; // Get the relations table view's columns @@ -361,11 +360,13 @@ } [data addObject:headings]; + + [headings release]; // Get the relation data for (NSDictionary *relation in relationData) { - NSMutableArray *temp = [NSMutableArray array]; + NSMutableArray *temp = [[NSMutableArray alloc] init]; [temp addObject:[relation objectForKey:@"name"]]; [temp addObject:[relation objectForKey:@"columns"]]; @@ -375,6 +376,8 @@ [temp addObject:([relation objectForKey:@"on_delete"]) ? [relation objectForKey:@"on_delete"] : @""]; [data addObject:temp]; + + [temp release]; } return data; -- cgit v1.2.3