• Advertisement
Sign in to follow this  

allocating dynamic memory and using vectors

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