mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
(_NSAddHandler): When creating E_QUEUE, don't autorelease and then
retain; instead just allocate it un-autoreleased. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1568 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
48238c0cf9
commit
584559b8bf
1 changed files with 8 additions and 6 deletions
|
@ -20,13 +20,15 @@
|
|||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include <assert.h>
|
||||
|
||||
#include <gnustep/base/preface.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <assert.h>
|
||||
|
||||
NSString *NSGenericException
|
||||
= @"NSGenericException";
|
||||
|
@ -175,12 +177,12 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
void
|
||||
_NSAddHandler( NSHandler *handler )
|
||||
{
|
||||
if (!e_queue) {
|
||||
e_queue = [[NSMutableArray arrayWithCapacity:8] retain];
|
||||
}
|
||||
if (!e_queue)
|
||||
e_queue = [[NSMutableArray alloc] initWithCapacity:8];
|
||||
|
||||
[e_queue addObject:
|
||||
[NSValue value:&handler withObjCType:@encode(NSHandler *)]];
|
||||
[NSValue value: &handler
|
||||
withObjCType: @encode(NSHandler*)]];
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue