Skip to content

Instantly share code, notes, and snippets.

@jawngee
Created December 9, 2010 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jawngee/734299 to your computer and use it in GitHub Desktop.
Save jawngee/734299 to your computer and use it in GitHub Desktop.
//
// SomeObject.h
//
#import <Cocoa/Cocoa.h>
@interface SomeObject : NSObject {
NSMutableArray *things;
NSMutableDictionary *someOtherThings;
}
@end
//
// SomeObject.m
//
#import "SomeObject.h"
@implementation SomeObject
- (id)init {
if (self=[super init]) {
things=[[NSMutableArray arrayWithObjects:@"one",@"two",@"three",nil] retain];
someOtherThings=[[NSDictionary alloc] init];
}
return self;
}
-(void)dealloc {
[things release];
[someOtherThings release];
[super dealloc];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment