• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get MD5 without crashing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get MD5 without crashing


  • Subject: Re: Get MD5 without crashing
  • From: Andy Lee <email@hidden>
  • Date: Tue, 4 Nov 2008 12:16:22 -0500

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Get MD5 without crashing
      • From: "Mr. Gecko" <email@hidden>
References: 
 >Get MD5 without crashing (From: "Mr. Gecko" <email@hidden>)
 >Re: Get MD5 without crashing (From: Alex Heinz <email@hidden>)
 >Re: Get MD5 without crashing (From: Roland King <email@hidden>)
 >Re: Get MD5 without crashing (From: Alex Heinz <email@hidden>)
 >Re: Get MD5 without crashing (From: Roland King <email@hidden>)
 >Re: Get MD5 without crashing (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: Re: CALayer contents memory leak
  • Next by Date: Re: Get MD5 without crashing
  • Previous by thread: Re: Get MD5 without crashing
  • Next by thread: Re: Get MD5 without crashing
  • Index(es):
    • Date
    • Thread