Fix memory leak in wxOverlay in wxOSX

Define dealloc explicitly to make sure the property is released.
This commit is contained in:
Stefan Csomor
2020-08-11 15:37:09 +02:00
committed by Vadim Zeitlin
parent 458d4666df
commit b1cf40868d

View File

@@ -64,7 +64,7 @@
self = [super initWithContentRect:contentRect styleMask:style backing:backingStoreType defer:flag];
if ( self )
{
self.overlayView = [[wxOSXOverlayView alloc] initWithFrame:contentRect];
self.overlayView = [[[wxOSXOverlayView alloc] initWithFrame:contentRect] autorelease];
[self setContentView:self.overlayView];
[self setOpaque:NO];
@@ -75,6 +75,10 @@
return self;
}
- (void)dealloc
{
[super dealloc];
}
@end
@implementation wxOSXOverlayView