Here's another question. Can textures pile up in the background and max out memory?
Yes. If you keep creating textures and don't ever glDeleteTextures them, then eventually you'll fill up memory on the video card, and OpenGL will start swapping them in and out to the video card as they're used. This can be a big performance problem, and OpenGL won't tell you if that's happening. So you want to be a little careful with what and how many textures you're asking OpenGL to use.
The reason I ask is that I've written a Sprite class. Naturally, I've written a destructor that uses the glDeleteTextures call to delete the texture being referenced in that sprite class. But then I realized that the texture the Sprite object references can also be referenced by another variable. So if a Sprite object is destroyed and the texture goes with it, but then another reference to that texture is used for something, it'll cause problems. So, what's the recommended solution? Should I not destroy textures in the Sprite class at the risk of texture buildup? Or is there a better solution I'm not thinking of?
The correct thing to do is to have your game be aware of the textures it's asked OpenGL to use. If a texture is used for lots of sprites, your game should only ask OpenGL to create it once, and then share that texture ID amongst all the sprites. You should then tell OpenGL to destroy the texture only once no sprites are referencing the texture any more, and you don't expect to need the texture again. (That is, it's worth keeping projectile textures around, even if no sprites are currently drawing with them, because you'll probably need them again soon. No point destroying them and then immediately re-creating them a frame or two later, after all!)
Personally, I wrap the OpenGL texture ID in a "Texture" class, on which I also store a "reference count"; the number of objects referencing that texture. As I create objects which use the texture, I increment the reference count, and as I destroy them, I decrement the reference count. If the reference count is greater than zero, I know that something is still using that texture. Or if it drops to zero, then I know that nothing's using it any more and it can safely be removed from OpenGL. And if the reference count drops below zero, then I know I have a bug in my code.