Why scoped pointers in boost

boost, c++, scoped-ptr

Solution

Not if it's of dynamic size or type. In addition, scoped pointers can be swapped, and in C++11 `unique_ptr` can be moved, so they're not strictly scoped.

Problem

What is the objective of scoped pointer? to my understanding, the scoped pointer manages the memory within a block of code. If i want to declare a variable within a block , i can just declare it on a stack and not worry about cleaning.

Original source

Related problems