I finally got it working.
I put the crypto object in the header file and than every time the md5 method starts, it would release and make it nil

Thanks for the help,
Mr. Gecko

On Nov 4, 2008, at 11:16 AM, Andy Lee wrote:

On Nov 4, 2008, at 11:41 AM, Mr. Gecko wrote:
now that I added a auto release pool it crashes later on. but it doesn't have to do with MD5 anymore it has to do with the hexdump of SSCrypto.
[...]

- (NSString *)md5:(NSString *)MD5 {
SSCrypto *crypto = [[SSCrypto alloc] init];
[crypto setClearTextWithString:MD5];

return [[[crypto autorelease] digest:@"MD5"] hexval];
}

Is it possible either you need to retain the return value from this method, or you're over-releasing it? Have you tried turning NSZombieEnabled on?

You mentioned not being familiar with release and autorelease. (Actually you said you couldn't find details on when to use them, which I find surprising.) Have you read the document Jonathan del Strother recommended?

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html

Do not try to guess your way around retain and release -- you'll just be wasting a lot of your own time. It's not that hard once you get the hang of it.

--Andy


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to