From a11329bee74b9c4a7812a08eeb01671cb8e7ac51 Mon Sep 17 00:00:00 2001 From: Aleksey Kosylo Date: Tue, 5 Mar 2024 12:28:39 +0100 Subject: [PATCH] add release for promise results --- DXFeedFramework/Native/Promise/NativePromise.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DXFeedFramework/Native/Promise/NativePromise.swift b/DXFeedFramework/Native/Promise/NativePromise.swift index 403625b7c..f2e8ba109 100644 --- a/DXFeedFramework/Native/Promise/NativePromise.swift +++ b/DXFeedFramework/Native/Promise/NativePromise.swift @@ -72,6 +72,9 @@ class NativePromise { let listPointer = try ErrorCheck.nativeCall(thread, dxfg_Promise_List_EventType_getResult(thread, promiseEvents)) + defer { + _ = try? ErrorCheck.nativeCall(thread, dxfg_CList_EventType_release(thread, listPointer)) + } var results = [MarketEvent]() let size = listPointer.pointee.size for index in 0..