R

Ravina • 3.68K Points
Extraordinary

Q. Which smart pointer automatically deallocates memory when out of scope?

  • (A) Rc<T>
  • (B) Box<T>
  • (C) Arc<T>
  • (D) RefCell<T>
  • Correct Answer - Option(B)
  • Views: 6
  • Filed under category Rust
  • Hashtags:

Explanation by: Ravina
Box<T> automatically deallocates heap memory when dropped.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.