Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - jd.russell

Pages: [1]
1
Hi, I'm new here, and I'm creating a game using SFML. It's a 2D isometric game with coherent terrain generation using perlinnoise. What I am doing is creating a dynamically allocated array of sf::Sprite objects to draw to the screen during my render method. The array is somewhere in the neighborhood of 65k elements in the current state (this will probably be a medium sized map and will increase to upwards of 300k if possible). So I'm having to dynamically allocate the memory before assigning the sprite textures and positions in isometric 2d space. My question is this... won't I have to delete the array at program shutdown? I tried doing so but, no matter where I put the delete statement the debug output says I'm trying to delete an invalid pointer. Do I have to delete this array or is SFML doing that for me? And while I'm at it I should probably ask if there is a better way to do what I'm doing?

Pages: [1]