mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
More debugging cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27782 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
caf400979f
commit
76c5af245a
3 changed files with 37 additions and 30 deletions
|
@ -129,10 +129,18 @@ static NSLock *pairLock = nil;
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
[ip release];
|
||||
[op release];
|
||||
[host release];
|
||||
[expires release];
|
||||
[ip setDelegate: nil];
|
||||
[op setDelegate: nil];
|
||||
[ip removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[op removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[ip close];
|
||||
[op close];
|
||||
DESTROY(ip);
|
||||
DESTROY(op);
|
||||
DESTROY(host);
|
||||
DESTROY(expires);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -537,14 +545,6 @@ static NSURLProtocol *placeholder = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) _schedule
|
||||
{
|
||||
[this->input scheduleInRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[this->output scheduleInRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
}
|
||||
|
||||
- (void) setDebug: (BOOL)flag
|
||||
{
|
||||
_debug = flag;
|
||||
|
@ -696,20 +696,15 @@ static NSURLProtocol *placeholder = nil;
|
|||
}
|
||||
[this->input setDelegate: self];
|
||||
[this->output setDelegate: self];
|
||||
[self _schedule];
|
||||
[this->input scheduleInRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[this->output scheduleInRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[this->input open];
|
||||
[this->output open];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) _unschedule
|
||||
{
|
||||
[this->input removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[this->output removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
}
|
||||
|
||||
- (void) stopLoading
|
||||
{
|
||||
if (_debug == YES)
|
||||
|
@ -722,7 +717,10 @@ static NSURLProtocol *placeholder = nil;
|
|||
{
|
||||
[this->input setDelegate: nil];
|
||||
[this->output setDelegate: nil];
|
||||
[self _unschedule];
|
||||
[this->input removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[this->output removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[this->input close];
|
||||
[this->output close];
|
||||
DESTROY(this->input);
|
||||
|
@ -1093,7 +1091,10 @@ static NSURLProtocol *placeholder = nil;
|
|||
}
|
||||
}
|
||||
|
||||
[self _unschedule];
|
||||
[this->input removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[this->output removeFromRunLoop: [NSRunLoop currentRunLoop]
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
if (_shouldClose == YES)
|
||||
{
|
||||
[this->input setDelegate: nil];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue