super-dealloc-2.m
来自「Mac OS X 10.4.9 for x86 Source Code gcc」· M 代码 · 共 48 行
M
48 行
/* APPLE LOCAL file mainline *//* Check for warnings about missing [super dealloc] calls. *//* Author: Ziemowit Laski <zlaski@apple.com> *//* { dg-do compile } */@interface Foo { void *isa;}- (void) dealloc;- (void) some_other;@end@interface Bar: Foo { void *casa;}- (void) dealloc0;@end@interface Baz: Bar { void *usa;}- (void) dealloc;@end@implementation Foo- (void) dealloc { isa = 0; /* Should not warn here. */}- (void) some_other { isa = (void *)-1;}@end@implementation Bar- (void) dealloc0 { casa = 0; [super some_other]; /* Should not warn here. */} @end@implementation Baz- (void) dealloc { usa = 0; [super dealloc0]; } /* { dg-warning "method possibly missing a .super dealloc. call" } */@end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?