I'm writing an engine to the best of my ability. It struck me when i came into the posibility of re-initialising the engine without having to restart the entire process. I then came to the point where i may not need the program to use the engine after a certain point... That's when i thought it would be helpful to clear the memory. Although each value uses little to no memory, i can live with it if there's no, "simple", way.
CadeX wrote:I'm writing an engine to the best of my ability. It struck me when i came into the posibility of re-initialising the engine without having to restart the entire process. I then came to the point where i may not need the program to use the engine after a certain point... That's when i thought it would be helpful to clear the memory. Although each value uses little to no memory, i can live with it if there's no, "simple", way.
Then you definetely don't want to free the pointer itself, you want to reset it to its initial value.