MCPcopy Create free account
hub / github.com/Recordscript/recordscript / drop

Method drop

libs/scrap/src/quartz/capturer.rs:98–110  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

96
97impl Drop for Capturer {
98 fn drop(&mut self) {
99 unsafe {
100 let _ = CGDisplayStreamStop(self.stream);
101 loop {
102 if *self.stopped.lock().unwrap() {
103 break;
104 }
105 std::thread::sleep(std::time::Duration::from_millis(30));
106 }
107 CFRelease(self.stream);
108 dispatch_release(self.queue);
109 }
110 }
111}

Callers

nothing calls this directly

Calls 1

sleepFunction · 0.85

Tested by

no test coverage detected