aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/smtp
diff options
context:
space:
mode:
Diffstat (limited to 'src/objc/smtp')
-rw-r--r--src/objc/smtp/MCOSMTPOperation.mm2
-rw-r--r--src/objc/smtp/MCOSMTPSendOperation.mm12
2 files changed, 2 insertions, 12 deletions
diff --git a/src/objc/smtp/MCOSMTPOperation.mm b/src/objc/smtp/MCOSMTPOperation.mm
index cd52ad13..9d96613f 100644
--- a/src/objc/smtp/MCOSMTPOperation.mm
+++ b/src/objc/smtp/MCOSMTPOperation.mm
@@ -41,6 +41,8 @@ typedef void (^CompletionType)(NSError *error);
NSError * error = [NSError mco_errorWithErrorCode:MCO_NATIVE_INSTANCE->error()];
_completionBlock(error);
+ [_completionBlock release];
+ _completionBlock = NULL;
}
- (void) setSession:(MCOSMTPSession *)session
diff --git a/src/objc/smtp/MCOSMTPSendOperation.mm b/src/objc/smtp/MCOSMTPSendOperation.mm
index e41a9f5a..776f7270 100644
--- a/src/objc/smtp/MCOSMTPSendOperation.mm
+++ b/src/objc/smtp/MCOSMTPSendOperation.mm
@@ -80,18 +80,6 @@ private:
[self start];
}
-- (void)operationCompleted {
- if (_completionBlock == NULL)
- return;
-
- nativeType *op = MCO_NATIVE_INSTANCE;
- if (op->error() == mailcore::ErrorNone) {
- _completionBlock(nil);
- } else {
- _completionBlock([NSError mco_errorWithErrorCode:op->error()]);
- }
-}
-
- (void) bodyProgress:(unsigned int)current maximum:(unsigned int)maximum
{
if (_progress != NULL) {