Original Post
Hey. I have a several classes that all derive from XBase_Image. They all load images from a .png file. My issue is that the way that these objects deal with the surface of the image that was loaded when they are assigned to another object... for example. XImage x1 (a class that derives from XBase_Image) might load an_image.png and then XImage x2 is created from x1 (copy constructed). x2 will take everything of x1's except the surface.. which it re-loads from the file name stored in x1. That's my problem.. I need to find a way to stop re-loading the image if it has already been loaded elsewhere. I was thinking of using maybe a shared pointer or some Surface_Manager class or something? Anyone have any ideas of how to solve this problem? Cheers!