gnustep-dev
[Top][All Lists]
Advanced

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

Re: Two gui ABI changes


From: Wolfgang Lux
Subject: Re: Two gui ABI changes
Date: Mon, 30 Mar 2009 00:05:52 +0200

Fred Kiefer wrote:

I just had a look at the only other place where we try to handle
graphics calls from a secondary thread, NSAlert, and the code there
looks wrong to me. Could somebody else please give a second opinion
before I start to clean that up?

I guess you mean the implementation of
-beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:.
Yes, this is outright broken.

The other point I noticed is the unusual memory handling of the
private _GSAlertPanelCreation class w.r.t its panel attribute.
This attribute is initialized in the -makePanel method but not
released in -dealloc, which in principle means asking for a
space leak. A more idiomatic solution would be to release the
panel in _GSAlertPanelCreation's -dealloc method and retain the
panel in the private getSomePanel function (which is the only
place where _GSAlertPanelCreation is used). And probably it
would be a good idea to use _GSAlertPanelCreation also when
getSomePanel is called on the main thread (if only to ensure
that any future fixes or changes to this code will apply to
the main thread as well as to secondary threads).

Wolfgang





reply via email to

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