Must use Block_{copy,release} to be GC compliant
This commit is contained in:
parent
61cb6c09e2
commit
6bb680470c
|
@ -17,14 +17,14 @@
|
|||
modalForWindow: docWindow
|
||||
modalDelegate: self
|
||||
didEndSelector: @selector(my_blockSheetDidEnd:returnCode:contextInfo:)
|
||||
contextInfo: [block copy]];
|
||||
contextInfo: Block_copy(block)];
|
||||
}
|
||||
|
||||
- (void)my_blockSheetDidEnd: (NSWindow *)sheet returnCode: (NSInteger)returnCode contextInfo: (void *)contextInfo
|
||||
{
|
||||
MASheetBlock block = (MASheetBlock)contextInfo;
|
||||
block(returnCode);
|
||||
[block release];
|
||||
Block_release(block);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue
Block a user