
150. Concepts, UB, interview questions, Boost
C++ Club
00:00
C++ References - I Like the Simple Finally
I like the simple finally. I don't know what's wrong with that. This is a standard for media, so it becomes much more complicated. How many memory allocations will happen if you use pushback in vector to push one million elements? And the answer is the number of allocations depends on implementation. Because by default, most often vector allocates twice the capacity each time it runs out of space. Of course, a better solution is pre-allocate. What's the difference between make shared and shared pointer constructor? And that's related to the control block, which is allocated in one block and two blocks in,. if you don't use make shared. Another question. You need to
Transcript
Play full episode