Hi,
Trying to save memory (and loading time) by creating a 'holding' object which will contain all/some of my game sprites that I load up.
Now if I want to pass those sprites along to be used by another object, and use something like
Is that saving memory? ie is it passing a link to the sprites, or is it duplicating the data? Not too sure what's happening inside...
-> Is it better to use some kind of pointer? (Never used those before so not too sure..)
Any insight is appriciated.
Thanks,
KrayzBlu
Trying to save memory (and loading time) by creating a 'holding' object which will contain all/some of my game sprites that I load up.
Now if I want to pass those sprites along to be used by another object, and use something like
newobject.sprites = holderobject.sprites
Is that saving memory? ie is it passing a link to the sprites, or is it duplicating the data? Not too sure what's happening inside...
-> Is it better to use some kind of pointer? (Never used those before so not too sure..)
Any insight is appriciated.
Thanks,
KrayzBlu