Thanks Jules. I thought that would copy the whole ‘panel’ class to the function, which would be a waste. I have already read the thread about 10.6 and that you’re keeping ScopedPointer to prevent existing code from breaking. But it feels like, a ‘for now’ thing.
That’s the whole point of using smart pointers. They make it hard to copy stuff, so it doesn’t happen by accident.
Smart pointers create little objects on the stack, so that normal life time methods apply (i.e. getting deleted when the scope ends), even though the actual object lives on the bigger heap memory.