/// Drops the `Rc<T>`.
///
/// This will decrement the strong reference count. If the strong reference
/// count becomes zero and the only other references are `Weak<T>` ones,
/// `drop`s the inner value.
///
/// # Examples
///
/// ```
/// use std::rc::Rc;
///
/// {
///     let five = Rc::new(5);
///
///     // stuff
///
///     drop(five); // explicit drop
/// }
/// {
///     let five = Rc::new(5);
///
///     // stuff
///
/// } // implicit drop
/// ```
Drops the `Rc`.
This will decrement the strong reference count. If the strong reference
count becomes zero and the only other references are `Weak` ones,
`drop`s the inner value.
Drops the ` Rc ` . This will decrement the strong reference count . If the strong reference count becomes zero and the only other references are ` Weak ` ones ` drop ` s the inner value .
fn drop(&mut self) {
        unsafe {
            let ptr = *self._ptr;
            if !(*(&ptr as *const _ as *const *const ())).is_null() &&
                ptr as *const () as usize != mem::POST_DROP_USIZE {
                self.dec_strong();
                if self.strong() == 0 {
                    // destroy the contained object
                    drop_in_place(&mut (*ptr).value);
                    // remove the implicit "strong weak" pointer now that we've
                    // destroyed the contents.
                    self.dec_weak();
                    if self.weak() == 0 {
                        deallocate(ptr as *mut u8,
                                   size_of_val(&*ptr),
                                   align_of_val(&*ptr))
                    }
                }
            }
        }
    }
fn drop ( & mut self ) { unsafe { let ptr = * self . _ptr ; if ! ( * ( & ptr as * const _ as * const * const ( ) ) ) . is_null ( ) && ptr as * const ( ) as usize != mem :: POST_DROP_USIZE { self . dec_strong ( ) ; if self . strong ( ) == 0 { // destroy the contained object drop_in_place ( & mut ( * ptr ) . value ) ; // remove the implicit "strong weak" pointer now that we've // destroyed the contents. self . dec_weak ( ) ; if self . weak ( ) == 0 { deallocate ( ptr as * mut u8 , size_of_val ( & * ptr ) , align_of_val ( & * ptr ) ) } } } } }
Drops the `Rc<T>`.
Drops the ` Rc<T > ` .
&mut self
examples




stuff

drop(five); // explicit drop
}
{
let five = Rc::new(5).

stuff

} // implicit drop
```
stuff drop ( five ) ; // explicit drop } { let five = Rc :: new ( 5 ) . stuff } // implicit drop ` ` `