mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 19:01:54 +00:00
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:
parent
e3a3e81e68
commit
35cecfa35d
2 changed files with 6 additions and 15 deletions
|
@ -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>
|
Tue Jan 25 14:52:27 2000 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
Contributed by Fred Kiefer:
|
Contributed by Fred Kiefer:
|
||||||
|
|
|
@ -117,19 +117,6 @@ BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo);
|
||||||
|
|
||||||
@implementation NSWindow
|
@implementation NSWindow
|
||||||
|
|
||||||
- (int) arc
|
|
||||||
{
|
|
||||||
return [self retainCount] - [NSAutoreleasePool autoreleaseCountForObject: self];
|
|
||||||
}
|
|
||||||
- (void) release
|
|
||||||
{
|
|
||||||
[super release];
|
|
||||||
}
|
|
||||||
- (id) retain
|
|
||||||
{
|
|
||||||
return [super retain];
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct NSView_struct
|
typedef struct NSView_struct
|
||||||
{
|
{
|
||||||
@defs(NSView)
|
@defs(NSView)
|
||||||
|
@ -1331,7 +1318,6 @@ resetCursorRectsForView(NSView *theView)
|
||||||
- (void) close
|
- (void) close
|
||||||
{
|
{
|
||||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
|
||||||
|
|
||||||
[nc postNotificationName: NSWindowWillCloseNotification object: self];
|
[nc postNotificationName: NSWindowWillCloseNotification object: self];
|
||||||
_f.has_opened = NO;
|
_f.has_opened = NO;
|
||||||
|
@ -1342,7 +1328,6 @@ resetCursorRectsForView(NSView *theView)
|
||||||
[NSApp removeWindowsItem: self];
|
[NSApp removeWindowsItem: self];
|
||||||
[self orderOut: self];
|
[self orderOut: self];
|
||||||
|
|
||||||
RELEASE(arp);
|
|
||||||
if (_f.is_released_when_closed)
|
if (_f.is_released_when_closed)
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue