Skip to content

Commit

Permalink
fix: check if this retain is legit
Browse files Browse the repository at this point in the history
  • Loading branch information
FL33TW00D authored and kvark committed May 4, 2023
1 parent 875d91e commit b7977c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/computepass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b7977c3

Please sign in to comment.