Passing Pointers or References?
I've been working on a basic framework that contains a series of objects that are instantiated and stored globally within one super class (hope my terminology is correct). Simply put, I have a series of classes, let's go with just three for now: Game, Filesystem, Renderer.
Game contains pointers to both Filesystem and Renderer.
After Filesystem is initialized with the new operator, it's passed to Renderer.
On a WindowsXP system, this appears to work normally in both Debug and Release modes. However, once I move over to a Vista machine, the neither version works and I see bad pointer errors within the debugger.
I doubt this is a Windows problem because if it's a pointer problem (more than likely) it will eventually effect any system that it's part of.
So I guess my question is if I should continue to pass pointers to the various objects (e.g., Renderer(Filesystem *filesystem)) or should I instead be passing references to the pointers? Am I going about this entirely the wrong way?