Hi Naji, would the player be leaving anything behind on his journey? If not you could wrap around and come back into the other side of the canvas.
If he IS then you could still wrap around but use an instance variable (say ShowInWrap) on all of the objects to define which wrap they appear in. You'd also need a global variable (say Wrap)
Whenever you create an object you'd set it's ShowInWrap value to whatever Wrap is at that time.
Whenever your player falls off the edge you increment the Wrap value (or decrement if he's going back again) and only make visible any objects with matching ShowInWrap values.
The above would work for 1D (e.g. a runner going left and right) and if you're wanting infinite 2D then you'd just need to wrap the X and Y separately.
Hope that makes sense.