A struct is a value type. So it is passed by value and is placed on the stack.

{
    S s;
}

S DTor is called at the end of the scope. So you can rely on RAII as long as you use structs.

Reply via email to