Skip to content

Commit 66cb092

Browse files
Store Scope in OLPHttpClient to prolong lifetime (#1619)
An attempt to make static objects to live long enough when parent objects are destructed randomly Resolves #1613 Relates-To: HERESDK-6943 Signed-off-by: Rustam Gamidov <ext-rustam.gamidov@here.com>
1 parent 2c80e5e commit 66cb092

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <sstream>
2626

2727
#include "context/ContextInternal.h"
28+
#include "olp/core/context/Context.h"
2829
#include "olp/core/context/EnterBackgroundSubscriber.h"
2930
#include "olp/core/http/Network.h"
3031
#include "olp/core/logging/Log.h"
@@ -80,6 +81,7 @@ @interface OLPHttpClient ()<NSURLSessionDataDelegate>
8081
@implementation OLPHttpClient {
8182
NSOperationQueue* _delegateQueue;
8283

84+
olp::context::Context::Scope _scope;
8385
std::shared_ptr<EnterBackgroundSubscriberImpl> _enterBackgroundSubscriber;
8486
}
8587

0 commit comments

Comments
 (0)