Skip to content

Instantly share code, notes, and snippets.

@fcy

fcy/gist:5051802

Created Feb 27, 2013
Embed
What would you like to do?
Super ugly code. Discussion: https://alpha.app.net/fcy/post/3286152
@implementation DatabaseConnection
static DatabaseConnection *connection;
+ (DatabaseConnection *)connection;
{
return connection;
}
+ (void)setConnection:(DatabaseConnection *)newConnection;
{
[newConnection retain];
[connection release];
connection = newConnection;
}
// open connection
- (void) open;
{}
// close connection
- (void) close;
{}
- (id)copyWithZone:(NSZone *)zone {
return self;
}
- (id)retain {
return self;
}
- (unsigned)retainCount {
return UINT_MAX;
}
- (void)release {
}
- (id)autorelease {
return self;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment