I've got a GC-only document-based application and I'm trying to add basic print operations to my documents. I've reduced this down to what I think is the absolute minimum required here and I'm still seeing this bug.

With a completely new Document-based application I'm adding these 3 methods to my document class:

- (void)close {
    NSLog(@"closing");
    [super close];
}

- (void)finalize {
    NSLog(@"finalizing");
    [super finalize];
}

- (NSPrintOperation *)printOperationWithSettings:(NSDictionary *)printSettings error:(NSError **)outError {
    NSPrintInfo *printInfo = [self printInfo];
    [printInfo setValuesForKeysWithDictionary:printSettings];

NSView *view = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 500, 500)];

return [NSPrintOperation printOperationWithView:view printInfo:printInfo];
}

Now, if I run the program and open the print panel and cancel it a few times in a row, usually 3 is enough and then close the document. The document object itself will never finalize. And no documents created or opened after that point will get finalized.

I've logged the document object address at creation time and once I've seen that it has not been finalized I've paused the program and tried info gc-roots and info gc-references on the document object. gc-roots returns zero roots and gc-references returns nothing at all.

What am I missing?


Ashley

_______________________________________________

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

This email sent to [EMAIL PROTECTED]

Reply via email to