Permalink
Browse files

Added -finalize methods for GC compatibility

  • Loading branch information...
1 parent 11932c0 commit f457ee94c8722c5fb220695b81f9a64c548ce9f4 @davedelong davedelong committed Mar 12, 2011
Showing with 12 additions and 0 deletions.
  1. +8 −0 src/FMDatabase.m
  2. +4 −0 src/FMResultSet.m
View
@@ -21,6 +21,10 @@ - (id)initWithPath:(NSString*)aPath {
return self;
}
+- (void)finalize {
+ [self close];
+}
+
- (void)dealloc {
[self close];
@@ -722,6 +726,10 @@ - (void)setCachedStatements:(NSMutableDictionary *)value {
@implementation FMStatement
+- (void)finalize {
+ [self close];
+}
+
- (void)dealloc {
[self close];
[query release];
View
@@ -19,6 +19,10 @@ + (id)resultSetWithStatement:(FMStatement *)statement usingParentDatabase:(FMDat
return [rs autorelease];
}
+- (void)finalize {
+ [self close];
+}
+
- (void)dealloc {
[self close];

0 comments on commit f457ee9

Please sign in to comment.