On Aug 13, 2012, at 1:00 AM, Quincey Morris 
<quinceymor...@rivergatesoftware.com> wrote:

> On Aug 13, 2012, at 00:04 , Britt Durbrow 
> <bdurb...@rattlesnakehillsoftworks.com> wrote:
> 
>> This is the exact line of code in question:
>> 
>> TrDocument *document=(TrDocument *)__RPCPersistentInfo__pool->document;
>> 
>> The document object in question is, when this happens, still in the middle 
>> of it's init method when that __weak __RPCPersistentInfo__pool->document 
>> variable gets zeroed out.
> 
> There's nothing about the fact that the document is executing a method that 
> prevents it from being deallocated before the method ends. It's really only a 
> question of whether there's a strong reference being maintained at the 'init' 
> call site for the duration of the 'init' call (assuming that, since the 
> document is in the process of being created, there can't be any strong 
> reference anywhere else yet).
> 
> So, before focusing too much on the the load of the weak reference, I'd 
> suggest you implement a 'dealloc' override in the document class, set a 
> breakpoint there, and see what's actually triggering deallocation.
> 
> 

Did that - no go. The dealloc method is not being called. Also, there's a 
printf statement in the dealloc method as well, so it's not just that the 
debugger is missing the breakpoint; the document object is in fact not being 
deallocated.



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to