Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2023-01-27 11:33:02 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4581ea0bbb5f0749c1f3c2908d1598f6401446b9
4581ea0b
1 parent
e6f48273
possible fix for AFURLSessionManager
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Warply/external/AFNetworking/AFURLSessionManager.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/external/AFNetworking/AFURLSessionManager.m
View file @
4581ea0
...
...
@@ -196,11 +196,25 @@ didCompleteWithError:(NSError *)error
//Performance Improvement from #2672
NSData
*
data
=
nil
;
// if (self.mutableData) {
// data = [self.mutableData copy];
// //We no longer need the reference, so nil it out to gain back some memory.
// self.mutableData = nil;
// }
@try
{
if
(
self
.
mutableData
)
{
data
=
[
self
.
mutableData
copy
];
//We no longer need the reference, so nil it out to gain back some memory.
self
.
mutableData
=
nil
;
}
}
@catch
(
NSException
*
exception
)
{
NSLog
(
@"delegate URLSession inner error: %@"
,
exception
.
reason
);
}
@finally
{
// NSLog(@"Finally condition");
}
if
(
self
.
downloadFileURL
)
{
userInfo
[
AFNetworkingTaskDidCompleteAssetPathKey
]
=
self
.
downloadFileURL
;
...
...
@@ -1050,7 +1064,16 @@ didCompleteWithError:(NSError *)error
// delegate may be nil when completing a task in the background
if
(
delegate
)
{
// [delegate URLSession:session task:task didCompleteWithError:error];
@try
{
[
delegate
URLSession
:
session
task
:
task
didCompleteWithError
:
error
];
}
@catch
(
NSException
*
exception
)
{
NSLog
(
@"delegate URLSession error: %@"
,
exception
.
reason
);
}
@finally
{
// NSLog(@"Finally condition");
}
[
self
removeDelegateForTask
:
task
];
}
...
...
Please
register
or
login
to post a comment