Jump to content
  • Advertisement
Sign in to follow this  
MrRage

Vector Copy vs. shared ptr.

This topic is 4012 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I’ve got a simple function that I wrote a while back that pushes vectors of longs with anywhere from 4-8 long values onto a queue. At the moment I’m simply pushing copies of vectors with the longs in there, once the queue is iterated though the queue then removes the vectors from it. In all I think there only two copies made so I’m wondering if it’s worthwhile to go back and update this to use something like a shared pointer or just keep it like this. Its low volume too so it’s not something that’s going to happen a lot. I’m guessing the right thing to do is just leave it and in the future use boost shared_pts instead.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!