Increasing memory by 1MB sounds about right for a 512x512 texture. The memory should be returned when you release the Texture2D and the dealloc is called but the system, though. The the glDeleteTextures line will delete the texture which should free the memory.
Regarding the Texture2D (Image) Texture2D (Text) Texture2D (Drawing), the author of the file used "categories" to divide up the implementation. It's OK that there's only one dealloc, because it's still just one class.
EDIT: I'd add an NSLog in the dealloc to find out if it's getting called. If dealloc is never getting called then the memory is never getting freed.
__________________

Free Games!
Last edited by smasher; 01-08-2010 at 11:15 AM.
|