bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Various retain/release bugs


From: Alexander Malmberg
Subject: Various retain/release bugs
Date: Wed, 20 Feb 2002 23:35:27 +0100

Hi,

My retain/release tracker is now in a usable state (not easily usable,
though), so I've used it while starting and then immediately quitting
LuserNET. It then gave me a 50mb dump of 3000 unreleased objects which
I've been going through. Here's the first batch:  :-)

1.
In [NSApplication -terminate:] the application tries to dealloc itself,
but it's still being retained by the
NSApplicationWillTerminateNotification. I talked about it with
Pierre-Yves (IRC) and he suggested that exit() should be called in
NSApplicationMain() instead of in terminate:. I moved the DESTROY(NSApp)
and exit() to NSApplicationMain() (sortof), and it seemed to work (and
it took care of ~1000 unreleased objects).

2.
GSServicesManager.m, NSRegisterServicesProvider() retains the
GSServicesManager (the variable servicesProvider). The GSServicesManager
tries to unregister itself in -dealloc, but dealloc will never be called
since it's retained. I changed the ASSIGN():s to plain = in
NSRegister... and NSUnregister... and it seems to work.

3.
NSMenu retains its NSMenuView; NSMenuView retains its NSMenu; NSMenuView
retains its NSMenuItemCell:s and they retain the NSMenuView, etc. Either
I'm missing something about how this is supposed to work or something is
really messed up here.

- Alexander Malmberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]