[qwaq] Fix some missed retain/release messages

This commit is contained in:
Bill Currie 2020-03-31 13:57:22 +09:00
parent 59481bdf61
commit 7ca3dc9db1
2 changed files with 22 additions and 16 deletions

View file

@ -26,12 +26,12 @@
}
icon[0] = [released retain];
icon[1] = [pressed retain];
onPress = [ListenerGroup listener];
onRelease = [ListenerGroup listener];
onClick = [ListenerGroup listener];
onDrag = [ListenerGroup listener];
onAuto = [ListenerGroup listener];
onHover = [ListenerGroup listener];
onPress = [[ListenerGroup listener] retain];
onRelease = [[ListenerGroup listener] retain];
onClick = [[ListenerGroup listener] retain];
onDrag = [[ListenerGroup listener] retain];
onAuto = [[ListenerGroup listener] retain];
onHover = [[ListenerGroup listener] retain];
return self;
}
@ -42,12 +42,12 @@
}
icon[0] = nil;
icon[1] = nil;
onPress = [ListenerGroup listener];
onRelease = [ListenerGroup listener];
onClick = [ListenerGroup listener];
onDrag = [ListenerGroup listener];
onAuto = [ListenerGroup listener];
onHover = [ListenerGroup listener];
onPress = [[ListenerGroup listener] retain];
onRelease = [[ListenerGroup listener] retain];
onClick = [[ListenerGroup listener] retain];
onDrag = [[ListenerGroup listener] retain];
onAuto = [[ListenerGroup listener] retain];
onHover = [[ListenerGroup listener] retain];
return self;
}
@ -55,6 +55,12 @@
{
[icon[0] release];
[icon[1] release];
[onPress release];
[onRelease release];
[onClick release];
[onDrag release];
[onAuto release];
[onHover release];
[super dealloc];
}

View file

@ -18,10 +18,10 @@
static void view_init(View *self)
{
self.onReceiveFocus = [ListenerGroup listener];
self.onReleaseFocus = [ListenerGroup listener];
self.onEvent = [ListenerGroup listener];
self.onViewScrolled = [ListenerGroup listener];
self.onReceiveFocus = [[ListenerGroup listener] retain];
self.onReleaseFocus = [[ListenerGroup listener] retain];
self.onEvent = [[ListenerGroup listener] retain];
self.onViewScrolled = [[ListenerGroup listener] retain];
}
-init