Retain/release fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6047 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-02-21 15:36:07 +00:00
parent d144de1a07
commit 96f84df118
2 changed files with 6 additions and 15 deletions

View file

@ -1,3 +1,9 @@
Mon Feb 21 14:40:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSWindow.m: ([-close]) remove spurious retain.
* Source/NSApplication.m: ([-run]) do startup stuff inside an
autorelease pool and release it before main loop.
Tue Jan 25 14:52:27 2000 Nicola Pero <n.pero@mi.flashnet.it>
Contributed by Fred Kiefer:

View file

@ -117,19 +117,6 @@ BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo);
@implementation NSWindow
- (int) arc
{
return [self retainCount] - [NSAutoreleasePool autoreleaseCountForObject: self];
}
- (void) release
{
[super release];
}
- (id) retain
{
return [super retain];
}
typedef struct NSView_struct
{
@defs(NSView)
@ -1331,7 +1318,6 @@ resetCursorRectsForView(NSView *theView)
- (void) close
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
CREATE_AUTORELEASE_POOL(arp);
[nc postNotificationName: NSWindowWillCloseNotification object: self];
_f.has_opened = NO;
@ -1342,7 +1328,6 @@ resetCursorRectsForView(NSView *theView)
[NSApp removeWindowsItem: self];
[self orderOut: self];
RELEASE(arp);
if (_f.is_released_when_closed)
RELEASE(self);
}