On 11 Sep 2012, at 13:56, pepijn de vos wrote:

> I dropped ARC for now. I found that with autorelease pools an getters and 
> setters, refcounting is not that painful at all.

Hmm, I forgot to hit reply-all on my post suggesting that you don't do this.  
With ARC, you must think about object ownership, with manual retain/release you 
must think about reference counting, which is less obvious.  Oh, and you get 
slower and buggier code in return for putting in this extra effort.

> You hand written setter is tricky though. Most people seem to be using 
> autorelease? I wonder what the actual synthesised methods look like.

You can look in the runtime if you really want to know...

> What is the preferred way to generate an SHA1 hash? openssl is deprecated on 
> Mac, but I don't think the Apple crypto package is available on GNUStep.

Niels ported CommonCrypto to GNUstep a while ago:

https://chiselapp.com/user/thebeing/repository/GS-CommonCrypto/index

> What happens when you have no autorelease pool? I was hoping it would crash, 
> and tell me what happened, but I assume I'm just leaking memory now.

It will leak, and it will NSLog() a message saying something along the lines of 
'autorelease called with no pool in place'.

David

-- Sent from my STANTEC-ZEBRA


_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to