#27655 - ravenq - Mon Oct 18, 2004 1:13 pm
Quick question for the board. Is it possible to reset the allocation pointer for the new operator in c++? I'm playing around with a setup where I load all my level data after a certain point in my code, and at the end of a level, want to quickly delete everything I've assigned by simply moving the pointer used in allocation (well, I'm assuming it's a pointer) back to the position it was in before starting the level, since all the data then effectively becomes useless.
Any simple way to do this? I'm aware this is probably a shortcut to properly managing memory, but it's a much quicker solution I think at least. It will effectively bring the code back to the state it was in before the level was started, since the score, lives, etc, are defined before the level data is allocated.
_________________
The Game is Nothing.
The Playing of it Everything
Any simple way to do this? I'm aware this is probably a shortcut to properly managing memory, but it's a much quicker solution I think at least. It will effectively bring the code back to the state it was in before the level was started, since the score, lives, etc, are defined before the level data is allocated.
_________________
The Game is Nothing.
The Playing of it Everything