From b7977c3dd19d7e470ef70ad4cd829d27bc909600 Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Sun, 2 Apr 2023 13:36:50 +0100 Subject: [PATCH] fix: check if this retain is legit --- src/computepass.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/computepass.rs b/src/computepass.rs index 50774d6..f65de28 100644 --- a/src/computepass.rs +++ b/src/computepass.rs @@ -72,7 +72,10 @@ impl ComputePassSampleBufferAttachmentDescriptorRef { } pub fn set_sample_buffer(&self, sample_buffer: &CounterSampleBufferRef) { - unsafe { msg_send![self, setSampleBuffer: sample_buffer] } + unsafe { + let () = msg_send![sample_buffer, retain]; + msg_send![self, setSampleBuffer: sample_buffer] + } } pub fn start_of_encoder_sample_index(&self) -> NSUInteger {