<p><pre><code>  &gt;  What are the technical reasons you can&#x27;t guarantee an absence of leaks?
</code></pre>
Well, &#x27;leak&#x27; is one of those things that&#x27;s easy for a programmer to understand, but a hard thing for a computer to understand, because it&#x27;s really about intent. How long did you intend for some resource to live? Any global value is, in some sense, a leak. We had a long discussion about this, and, at least currently, we couldn&#x27;t come up with a formal enough definition of &#x27;leak&#x27; to even start tackling the problem of &quot;how do we solve leaks.&quot; (It is entirely possible that I am unaware about research on this topic... but given that solving leaks wasn&#x27;t a goal of Rust, fixing it would just be gravy anyway. You have to choose your battles, and Rust certainly isn&#x27;t perfect.)<p>As for how safe Rust can leak:<p><pre><code>    let x = Box::new(5);
    std::mem::forget(x);
</code></pre>
which can itself just be implemented in safe code:<p><pre><code>    use std::cell::RefCell;
    use std::rc::Rc;

    fn forget&lt;T&gt;(val: T) {
        struct Foo&lt;T&gt;(T, RefCell&lt;Option&lt;Rc&lt;Foo&lt;T&gt;&gt;&gt;&gt;);
        let x = Rc::new(Foo(val, RefCell::new(None)));
        *x.1.borrow_mut() = Some(x.clone());
    }
</code></pre>
or something like &quot;I have a thread that is holding the receiving end of a channel that infinitely loops without reading anything off,&quot; in which case anything sent down that channel leaks.