Sign in to follow this  
ekrax

allocating dynamic memory and using vectors

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this