File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ namespace Aws
85
85
private:
86
86
aws_client_bootstrap *m_bootstrap;
87
87
int m_lastError;
88
- std::unique_ptr<struct ClientBootstrapCallbackData > m_callbackData;
88
+ std::unique_ptr<class ClientBootstrapCallbackData > m_callbackData;
89
89
std::future<void > m_shutdownFuture;
90
90
bool m_enableBlockingShutdown;
91
91
};
Original file line number Diff line number Diff line change @@ -16,8 +16,13 @@ namespace Aws
16
16
* Lives until the bootstrap's shutdown-complete callback fires.
17
17
*/
18
18
// / @private
19
- struct ClientBootstrapCallbackData
19
+ class ClientBootstrapCallbackData
20
20
{
21
+ private:
22
+ Allocator *m_allocator;
23
+
24
+ public:
25
+ ClientBootstrapCallbackData (Allocator *allocator) : m_allocator(allocator) {}
21
26
/* *
22
27
* Promise for bootstrap's shutdown.
23
28
*/
@@ -40,7 +45,7 @@ namespace Aws
40
45
callbackData->ShutdownCallback ();
41
46
}
42
47
43
- delete callbackData;
48
+ Crt::Delete (callbackData, callbackData-> m_allocator ) ;
44
49
}
45
50
};
46
51
@@ -49,7 +54,8 @@ namespace Aws
49
54
HostResolver &resolver,
50
55
Allocator *allocator) noexcept
51
56
: m_bootstrap(nullptr ), m_lastError(AWS_ERROR_SUCCESS),
52
- m_callbackData (new ClientBootstrapCallbackData()), m_enableBlockingShutdown(false )
57
+ m_callbackData (Crt::New<ClientBootstrapCallbackData>(allocator, allocator)),
58
+ m_enableBlockingShutdown(false )
53
59
{
54
60
m_shutdownFuture = m_callbackData->ShutdownPromise .get_future ();
55
61
You can’t perform that action at this time.
0 commit comments