My question is a bit vague so let me elaborate. I'm a beginner programmer working on my first flash game which for the point of this question is a side-scrolling platformer like mario for example. Unlike a traditional platformer though, the level will continue indefinitely until a player dies or quits the game. The level is tilebased and will be generated automatically through a array which specifies what object is in each tile( or 0 if there is no object). In order to ensure my game doesn't automatically crash from excessive objects I will generate more of the map( by creating new instances of objects) as the player progresses so that as the player move right the map is generated just past the edge of the screen. 

Now back to the matter at hand, I'm guessing that once the player gets to a certain point in the game it will start to slow down because more and more objects are being created.
I assume the solution to this problem would be to remove the instances to the left of the screen as the player progresses however the problem with this is I need the player to have the ability to go back through the level.

So my question is: how can i 'delete' or remove the instances from memory, so my game doesn't slow down, but also restore the instance when the player moves into a certain proximity of where that instance is (or was).

Note: Currently aside from the player the only object i have in the game is the 'Wall' object all instances of which are stored in the 'Wallarray' array which i currently only use to reference instances of a Wall for collision detection