mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-10 08:10:49 +00:00
Fixes for dealloc when init has not been called.
This commit is contained in:
parent
65b9b55e01
commit
6a723e5a87
5 changed files with 15 additions and 12 deletions
|
@ -8440,7 +8440,7 @@ GS_PRIVATE_INTERNAL(GSMimeSMTPClient)
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[self abort];
|
[self abort];
|
||||||
if (internal != nil)
|
if (GS_EXISTS_INTERNAL)
|
||||||
{
|
{
|
||||||
DESTROY(internal->reply);
|
DESTROY(internal->reply);
|
||||||
DESTROY(internal->wdata);
|
DESTROY(internal->wdata);
|
||||||
|
|
|
@ -857,7 +857,7 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
if (debug_connection)
|
if (debug_connection)
|
||||||
NSLog(@"deallocating %@", self);
|
NSLog(@"deallocating %@", self);
|
||||||
[self finalize];
|
[self finalize];
|
||||||
if (internal != nil)
|
if (GS_EXISTS_INTERNAL)
|
||||||
{
|
{
|
||||||
GS_DESTROY_INTERNAL(NSConnection);
|
GS_DESTROY_INTERNAL(NSConnection);
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
RELEASE(_dateFormat);
|
RELEASE(_dateFormat);
|
||||||
if (internal != 0)
|
if (GS_EXISTS_INTERNAL)
|
||||||
{
|
{
|
||||||
RELEASE(internal->_locale);
|
RELEASE(internal->_locale);
|
||||||
RELEASE(internal->_tz);
|
RELEASE(internal->_tz);
|
||||||
|
|
|
@ -559,7 +559,7 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
|
||||||
RELEASE(_attributedStringForNil);
|
RELEASE(_attributedStringForNil);
|
||||||
RELEASE(_attributedStringForNotANumber);
|
RELEASE(_attributedStringForNotANumber);
|
||||||
RELEASE(_attributedStringForZero);
|
RELEASE(_attributedStringForZero);
|
||||||
if (internal != 0)
|
if (GS_EXISTS_INTERNAL)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ static void *queuePriorityCtxt = (void*)"queuePriority";
|
||||||
{
|
{
|
||||||
/* Only clean up if ivars have been initialised
|
/* Only clean up if ivars have been initialised
|
||||||
*/
|
*/
|
||||||
if (internal && internal->lock)
|
if (GS_EXISTS_INTERNAL)
|
||||||
{
|
{
|
||||||
NSOperation *op;
|
NSOperation *op;
|
||||||
|
|
||||||
|
@ -800,13 +800,16 @@ static NSOperationQueue *mainQueue = nil;
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[self cancelAllOperations];
|
[self cancelAllOperations];
|
||||||
DESTROY(internal->operations);
|
if (GS_EXISTS_INTERNAL)
|
||||||
DESTROY(internal->starting);
|
{
|
||||||
DESTROY(internal->waiting);
|
DESTROY(internal->operations);
|
||||||
DESTROY(internal->name);
|
DESTROY(internal->starting);
|
||||||
DESTROY(internal->cond);
|
DESTROY(internal->waiting);
|
||||||
DESTROY(internal->lock);
|
DESTROY(internal->name);
|
||||||
GS_DESTROY_INTERNAL(NSOperationQueue);
|
DESTROY(internal->cond);
|
||||||
|
DESTROY(internal->lock);
|
||||||
|
GS_DESTROY_INTERNAL(NSOperationQueue);
|
||||||
|
}
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue