Rust - When To Leak Memory

Sometimes developers put data in an Arc even though it is expected to be deallocated at the very end of the program. This makes the reference count maintained by Arc completely redundant. In this video we talk about 3 alternatives to using `Arc` in situations where you need to capture an immutable reference to a piece of data in closures passed to std::thread::spawn or the future passed to tokio::spawn. Keyboard: Glove80 - https://bit.ly/3EKyn7X Camera 1: Canon EOS R8 https://amzn.to/4gSpivt Camera 2: Canon EOS R5 https://amzn.to/3CCrxzl Monitor: Dell U4914DW 49in https://amzn.to/3MJV1jx Microphone: Sennheiser 416 https://amzn.to/3Fkti60 Microphone Interface: Focusrite Clarett+ 2Pre https://amzn.to/3J5dy7S Tripod: JOBY GorillaPod 5K https://amzn.to/3JaPxMA Mouse: Razer DeathAdder Elite https://amzn.to/4tu57ul Computer: Mac Studio M4 Max https://amzn.to/44RWIWK Lens: Canon RF35mm F1.8 https://amzn.to/49XHWkT Caffeine: High Brew Cold Brew Coffee https://amzn.to/3hXyx0q More Caffeine: Monster Energy Juice, Pipeline Punch https://amzn.to/3Czmfox