boost::shared_array - deleting contents

Started by
13 comments, last by MaulingMonkey 15 years, 8 months ago
Quote:Original post by ToohrVyknor boost shared array pointers offer thread-safety.

Ah. Now that is a bummer.

Quote:The reason why people use the SC++L [...]

I apologize for my ignorance here - I just want to make sure I know what is going on.

std::vector<float> floats;floats.reseve(1000000);

Is this allocated on the stack or heap? If it's stack - isn't this a bad thingTM given the huge size of what I'm allocating?
Advertisement
It is heap allocated.
It's allocated using the supplied Allocator -- if you supply no allocator, it defaults to the one that allocates on the free store (AKA “heap”).
Well shit, I wish I'd know that a while ago.

Alright, well I think this pushes me in the right direction. Many thanks!
Well, now you know :)

This topic is closed to new replies.

Advertisement