Memory leaks in DO fixed.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9557 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-04-11 12:30:32 +00:00
parent 4fdda0532b
commit 1b04f169ea
5 changed files with 141 additions and 37 deletions

View file

@ -34,10 +34,10 @@
/* Key for thread dictionary. */
static NSString *dict_key = @"_NSAssertionHandler";
+ (NSAssertionHandler*)currentHandler
+ (NSAssertionHandler*) currentHandler
{
NSMutableDictionary *dict;
NSAssertionHandler *handler;
NSMutableDictionary *dict;
NSAssertionHandler *handler;
dict = GSCurrentThreadDictionary();
handler = [dict objectForKey: dict_key];
@ -54,8 +54,8 @@ static NSString *dict_key = @"_NSAssertionHandler";
lineNumber: (int)line
description: (NSString*)format,...
{
id message;
va_list ap;
id message;
va_list ap;
va_start(ap, format);
message =
@ -65,8 +65,8 @@ static NSString *dict_key = @"_NSAssertionHandler";
NSLogv(message, ap);
va_end(ap);
[NSException raise:NSInternalInconsistencyException
format: message arguments: ap];
[NSException raise: NSInternalInconsistencyException
format: message arguments: ap];
/* NOT REACHED */
}
@ -76,8 +76,8 @@ static NSString *dict_key = @"_NSAssertionHandler";
lineNumber: (int) line
description: (NSString *) format,...
{
id message;
va_list ap;
id message;
va_list ap;
va_start(ap, format);
message =
@ -88,7 +88,7 @@ static NSString *dict_key = @"_NSAssertionHandler";
NSLogv(message, ap);
[NSException raise: NSInternalInconsistencyException
format: message arguments: ap];
format: message arguments: ap];
va_end(ap);
/* NOT REACHED */
}