Re: Overriding the release mehod

2017-01-26 Thread Bill Cheeseman
I don't disagree with this sentiment, but I would like to point out the other side of the coin. When I ask a question about how to do something, I find all too often that my question never gets answered. Instead, the thread gets taken over by an argument over whether anybody should ever do that

Re: Overriding the release mehod

2017-01-26 Thread Sandor Szatmari
I would take that one step further and say that because I expect that type of deep introspection I enjoy when find the answers to questions I intend to post before posting them, while preparing an email. As such, I find reading the discourse of this list interesting and valuable. Sandor > On

Re: Overriding the release mehod

2017-01-25 Thread Jonathan Hull
One of my favorite things about this list is that the standard response to a question is to ask about the underlying motivation. It shows that they are prepared to think deeply about your problem and don’t want to just give you a cookie cutter answer. One of the main signs of an intelligent pe

Re: Overriding the release mehod

2017-01-25 Thread Greg Parker
What Are You Trying To Do™ is in fact precisely the correct response to your question. Some overrides of -release need to call [super release]. Others do not. It depends on … what they are trying to do. Overriding release to unregister an observer is almost certainly a bad idea, but yes, such a

[off-topic] Re: Overriding the release mehod

2017-01-25 Thread Doug Hill
> On Jan 25, 2017, at 11:56 AM, Dave wrote: > > >> On 25 Jan 2017, at 19:37, Doug Hill wrote: >> >> >>> On Jan 25, 2017, at 11:23 AM, Dave >> > wrote: >>> >>> I also tried searching “release method documentation” but nada! >> >> I hear you about the search f

Re: Overriding the release mehod

2017-01-25 Thread Dave
> On 25 Jan 2017, at 19:37, Doug Hill wrote: > > >> On Jan 25, 2017, at 11:23 AM, Dave > > wrote: >> >> I also tried searching “release method documentation” but nada! > > I hear you about the search functionality of Apple's developer documentation. > They def

Re: Overriding the release mehod

2017-01-25 Thread Doug Hill
> On Jan 25, 2017, at 11:23 AM, Dave wrote: > > I also tried searching “release method documentation” but nada! I hear you about the search functionality of Apple's developer documentation. They definitely need a better search engine for documentation in both Xcode and the developer website a

Re: Overriding the release mehod

2017-01-25 Thread Dave
I also tried searching “release method documentation” but nada! ___ 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

Re: Overriding the release mehod

2017-01-25 Thread Dave
Cheers, I tried searching “release method definition” but that doesn’t bring it up - go figure! All the Best Dave > On 25 Jan 2017, at 19:04, Doug Hill wrote: > > >> On Jan 25, 2017, at 10:59 AM, Dave > > wrote: >> >> Hi, >> >>> Look at Apple's Foundation NSO

Re: Overriding the release mehod

2017-01-25 Thread Doug Hill
> On Jan 25, 2017, at 10:59 AM, Dave wrote: > > Hi, > >> Look at Apple's Foundation NSObject protocol reference document for the >> -release method. It includes this statement: > > Could you point me to the URL I still can’t find it. Apple’s documentation is > absolutely shocking! I’m lookin

Re: Overriding the release mehod

2017-01-25 Thread Dave
Hi, > Look at Apple's Foundation NSObject protocol reference document for the > -release method. It includes this statement: Could you point me to the URL I still can’t find it. Apple’s documentation is absolutely shocking! I’m looking at https://developer.apple.com/reference/objectivec/protoc

Re: Overriding the release mehod

2017-01-25 Thread Dave
Hi, Yes, I understand that, but really, I just wanted to know where it was written in black and white and I couldn’t find it by searching. I could have worked out where it was necessary to override release myself, I just wanted to know the effect of calling it and not calling it. Asking why I a

Re: Overriding the release mehod

2017-01-25 Thread Dave
> On 25 Jan 2017, at 16:48, Bill Cheeseman wrote: > > >> On Jan 25, 2017, at 11:23 AM, Dave > > wrote: >> >> I hate it when people as that question! There are some memory leaks in a 3rd >> party package. It overrides release to unregister an observer but doesn’

Re: Overriding the release mehod

2017-01-25 Thread Greg Weston
Dave wrote: > I hate it when people ask [why are you doing X]! Decades of experience seeing such questions make us think that when someone is asking how to do something extraordinary there's about 99% chance they don't actually need to do it and are making things harder for themselves. Sometime

Re: Overriding the release mehod

2017-01-25 Thread Bill Cheeseman
> On Jan 25, 2017, at 11:23 AM, Dave wrote: > > I hate it when people as that question! There are some memory leaks in a 3rd > party package. It overrides release to unregister an observer but doesn’t > call super. If I call super the leaks go away and all is well. I just want to > know where

Re: Overriding the release mehod

2017-01-25 Thread Dave
I hate it when people as that question! There are some memory leaks in a 3rd party package. It overrides release to unregister an observer but doesn’t call super. If I call super the leaks go away and all is well. I just want to know where is it documented really, I can’t find it searching the d

Re: Overriding the release mehod

2017-01-25 Thread Bill Cheeseman
Dave is working with a framework I wrote, which makes use of OmniGroup's "weak retain" concept from many years ago. See Ken Case's writeup at https://github.com/jnozzi/cocoadev.com/blob/888a4ffa2ab233762728d5e2f23c18a83feb3a6e/markdown/WeakReferences.md

Re: Overriding the release mehod

2017-01-25 Thread Mike Abdullah
You’re inevitably going to get asked this: Why on earth are you overriding release? It’s an incredibly niche thing to do, and the answer probably depends a lot on why you’re overriding it. > On 25 Jan 2017, at 16:52, Dave wrote: > > Hi, > > Does [suoer release] need to be called if you overrid

Overriding the release mehod

2017-01-25 Thread Dave
Hi, Does [suoer release] need to be called if you override this method? I’m 99.9% sure it does, but I can’t find it anywhere it actually says it in black and white. All the Best Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas