39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
- init
{
id ret;
inits++;
ret = init(self, _cmd);
printf("New %s with retain cnt " ZD "\n", [self name],
[ret retainCount]);
return ret;
}
- retain
{
id ret;
retains++;
ret = retain(self, _cmd);
printf("Retaining %s to " ZD "\n", [self name], [ret retainCount]);
return ret;
}
- (void)release
{
releases++;
printf("Releasing %s to " ZD "\n", [self name], [self retainCount] - 1);
release(self, _cmd);
}
@end
int
main()
{
|
|
|
|
>
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
- init
{
id ret;
inits++;
ret = init(self, _cmd);
printf("New %s with retain cnt " ZD "\n", [self className],
[ret retainCount]);
return ret;
}
- retain
{
id ret;
retains++;
ret = retain(self, _cmd);
printf("Retaining %s to " ZD "\n", [self className], [ret retainCount]);
return ret;
}
- (void)release
{
releases++;
printf("Releasing %s to " ZD "\n", [self className],
[self retainCount] - 1);
release(self, _cmd);
}
@end
int
main()
{
|