That if the situation allows you to allocate either on stack or on heap, you can do as you want. Usually you allocate small amounts of memory on stack and big amounts of memory on heap. But if you need a big chunk of memory only within a single scope, you can allocate it on stack as well as it's not likely that you'll run out of stack (which used to be a real threat "in the old days").
Dangerous? How come?Aren't the objects on the stack more dangeroues? thanks






Reply With Quote
Bookmarks