I have this very simple program where I just create an object and look at the retain count.
#import <Foundation/Foundation.h>
#import "GeometryCalculator.h"
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
GeometryCalculator *calculator = [[GeometryCalculator alloc] init];
NSLog(@"Counter: %d", [calculator retainCount]);
[calculator release];
[pool drain];
return 0;
}
I expected my retainCount to be 1 but it is 16863520. The Class GeometryCalculator is totally empty. No methodes, no instance variables.