Jump to content
  • Advertisement
Sign in to follow this  
ekrax

allocating dynamic memory and using vectors

This topic is 5152 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

for the last little while i've been using a basic opengl framework for all my little projects but i have decided to come back to it and re vamp it, by getting rid of global variables, and encapsulating it a little more. recently ive just started using the STL and now that i look back on some of my previous code i use a lot of new and delete ... is there any harm in using vectors for every single dynamic array? (note: im not doing any wierd custom allocation routines either) thanks for any suggestions

Share this post


Link to post
Share on other sites
Advertisement
I'd say 99% of the time dynamic arrays can be replaced by vectors or strings, and I can't think of an example for the 1% of the time it's a bad idea.

Share this post


Link to post
Share on other sites
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!