From: <dav...@us...> - 2008-09-22 00:52:08
|
Revision: 202 http://pgsqlformac.svn.sourceforge.net/pgsqlformac/?rev=202&view=rev Author: davydgeyl Date: 2008-09-22 00:52:02 +0000 (Mon, 22 Sep 2008) Log Message: ----------- memory leak fixed Modified Paths: -------------- trunk/PGSQLKit/PGSQLColumn.m Modified: trunk/PGSQLKit/PGSQLColumn.m =================================================================== --- trunk/PGSQLKit/PGSQLColumn.m 2008-09-09 03:57:43 UTC (rev 201) +++ trunk/PGSQLKit/PGSQLColumn.m 2008-09-22 00:52:02 UTC (rev 202) @@ -16,7 +16,7 @@ [super init]; index = columnIndex; - name = [[[[NSString alloc] initWithCString:PQfname(result, columnIndex)] retain] autorelease]; + name = [[NSString alloc] initWithCString:PQfname(result, columnIndex)]; type = PQftype(result, columnIndex); size = PQfsize(result, columnIndex); offset = PQfmod(result, columnIndex); @@ -24,7 +24,14 @@ return self; } -- (NSString *)name { +- (void)dealloc +{ + [name release]; + [super dealloc]; +} + +- (NSString *)name +{ return [[name retain] autorelease]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |