Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rustecal-samples/benchmarks/performance_send/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
iterations += 1;

// every ~2000 msgs, log if 1s has passed
if iterations % 2000 == 0 && last_log.elapsed() >= Duration::from_secs(1) {
if iterations.is_multiple_of(2000) && last_log.elapsed() >= Duration::from_secs(1) {
let secs = last_log.elapsed().as_secs_f64();
let kbyte_s = (bytes_sent as f64 / 1024.0) / secs;
let mbyte_s = kbyte_s / 1024.0;
Expand Down
5 changes: 3 additions & 2 deletions rustecal-service/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ impl ServiceClient {
result.push(ClientInstance::from_raw(instance_ptr));
offset += 1;
}

eCAL_ClientInstances_Delete(list_ptr);
}

result
Expand All @@ -107,6 +105,9 @@ impl ServiceClient {
impl Drop for ServiceClient {
fn drop(&mut self) {
unsafe {
let client_instances_ = eCAL_ServiceClient_GetClientInstances(self.handle);
eCAL_ClientInstances_Delete(client_instances_);

eCAL_ServiceClient_Delete(self.handle);
}
}
Expand Down