Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 01-08-2010, 10:42 AM   #2 (permalink)
smasher
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

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.
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 490
23 members and 467 guests
AngryOrange, ArthurOff, Arty Tales, baja_yu, Bertrand21, bignoggins, David-T, dbramhall, fanarin, Feldspar, gbenna, jbro, kln, lgehrig1, LooN3y, mini998, Nobbsy, pbart, revg, shigaugi, skog, stephenmwatts, Thompson22
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,427
Threads: 94,024
Posts: 402,577
Top Poster: BrianSlick (7,978)
Welcome to our newest member, shakiraeb60
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:15 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.