« first day (1723 days earlier)      last day (705 days later) » 

3:34 PM
I've never gotten good guidelines on when to choose the stack vs choosing the heap.
How do I know when an object is big enough that it should go on the heap instead of the stack?

Do I determine if it goes on the heap based on its lifetime?

There's always talk about smart pointers, but in my day to day code, I've always gotten the same results by just putting everything on the stack.

If I put stack objects into STL containers, don't they end up on the heap anyway?
Why would I want heap objects allocating more memory on the heap which in term allocate more memory on the heap. I'm already
 
1 message moved from Lounge<C++>
 

« first day (1723 days earlier)      last day (705 days later) »