Must use Block_{copy,release} to be GC compliant

This commit is contained in:
Matthias Neeracher 2011-08-15 03:15:07 +02:00
parent 61cb6c09e2
commit 6bb680470c

View File

@ -17,14 +17,14 @@
modalForWindow: docWindow modalForWindow: docWindow
modalDelegate: self modalDelegate: self
didEndSelector: @selector(my_blockSheetDidEnd:returnCode:contextInfo:) didEndSelector: @selector(my_blockSheetDidEnd:returnCode:contextInfo:)
contextInfo: [block copy]]; contextInfo: Block_copy(block)];
} }
- (void)my_blockSheetDidEnd: (NSWindow *)sheet returnCode: (NSInteger)returnCode contextInfo: (void *)contextInfo - (void)my_blockSheetDidEnd: (NSWindow *)sheet returnCode: (NSInteger)returnCode contextInfo: (void *)contextInfo
{ {
MASheetBlock block = (MASheetBlock)contextInfo; MASheetBlock block = (MASheetBlock)contextInfo;
block(returnCode); block(returnCode);
[block release]; Block_release(block);
} }
@end @end