More leak management fixes

This commit is contained in:
rfm 2024-11-17 16:16:46 +00:00
parent 90082eccac
commit cd3e69245d
9 changed files with 119 additions and 79 deletions

View file

@ -18,7 +18,7 @@ int main()
httpURL = [NSURL URLWithString: @"http://www.gnustep.org"];
foobarURL = [NSURL URLWithString: @"foobar://localhost/madeupscheme"];
TEST_FOR_CLASS(@"NSURLHandle", [NSURLHandle alloc],
TEST_FOR_CLASS(@"NSURLHandle", AUTORELEASE([NSURLHandle alloc]),
"NSURLHandle +alloc returns an NSURLHandle");
PASS_EXCEPTION([DummyHandle cachedHandleForURL: httpURL];,
@ -29,14 +29,11 @@ int main()
PASS([cls canInitWithURL: httpURL] == YES,
"Appropriate subclass found for +URLHandleClassForURL:");
handle1 = [[cls alloc] initWithURL: httpURL cached: YES];
handle1 = AUTORELEASE([[cls alloc] initWithURL: httpURL cached: YES]);
handle2 = [NSURLHandle cachedHandleForURL: httpURL];
PASS(handle2 != nil, "Available handle returned from cache");
[handle1 autorelease];
[cls autorelease];
#if !defined(GNUSTEP_BASE_LIBRARY)
PASS(NO, "URLHandleClassForURL: seems to hang on MacOS-X when given an unknown URL scheme ... you may want to check to see if it has been fixed");
#else