Oh, and I'm not trying to be a jerk about this in arguing...I'm just genuinely curious to know if it's a problem! On Thursday, January 03, 2008, at 01:39PM, "Christiaan Hofman" <[EMAIL PROTECTED]> wrote: > >On 3 Jan 2008, at 10:27 PM, Adam R. Maxwell wrote: > >> >> On Thursday, January 03, 2008, at 12:25PM, "Christiaan Hofman" >> <[EMAIL PROTECTED]> wrote: >>> >>> On 3 Jan 2008, at 8:55 PM, Adam R. Maxwell wrote: >>> >>>> Okay, that's right. There's still a retain cycle in the migration >>>> controller that should be unnecessary. When the document window >>>> closes, it closes the migration window regardless of what it's >>>> doing at the time. >>>> >>> >>> Why is there a retain cycle? And shouldn't the migration be stopped >>> when the document window closes? >> >> Yes, it should be stopped, but can the document window actually >> close before this stops? I can't make it do that. >> >> If I brute-force a document close like this >> >> if (current > 200) { >> [[self document] close]; >> NSLog(@"closed document %@", [self document]); >> } >> >> in the loop, the document clears the window controller's >> backreference. Since the enumerator retains the publications >> array, it just exhausts the loop and then sends [nil >> updatePreviews]. It's not a big deal, but it's nice to avoid extra >> bookkeeping if the kit already takes care of it. > >But if the migration window closes the document will also be cleared, >but then it should still send updatePreviews when it finishes. That's >why the document should be retained. So this is not a good example. > >Christiaan > >> >>>>>>> + // keep a reference to the document, because it may go away >>>>>>> when the window closes while we're busy > > > >------------------------------------------------------------------------- >This SF.net email is sponsored by: Microsoft >Defy all challenges. Microsoft(R) Visual Studio 2005. >http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >_______________________________________________ >Bibdesk-develop mailing list >Bibdesk-develop@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/bibdesk-develop > >
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop