0
@interface EAGLView1 : UIView<UIAlertViewDelegate> {
@private
/* The pixel dimensions of the backbuffer */
GLint backingWidth;
GLint backingHeight;
GLfloat transY;
GLint check;
EAGLContext *context;
GLint shipMover;
GLint shipMover2;
/* OpenGL names for the renderbuffer and framebuffers used to render to this view */
GLuint viewRenderbuffer, viewFramebuffer;
/* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
GLuint depthRenderbuffer;
NSTimer *animationTimer;
NSTimeInterval animationInterval;
CFTimeInterval lastTime;
Image *playerShip;
Texture2D *PlayerShip2;
Image *background;
Image *motherShip;
Image *motherShip2;
Image *bgLight;
Image *spaceShip1;
Image *spaceShip2;
GLint ship2check;
GLfloat ship2y;
GLfloat firex,firey;
GLint shipMinus;
GLint fireHitter;
GLint backCounter;
GLint bgCheck;
GLint shipy;
GLfloat motherShipx;
GLfloat motherShipx2;
GLint ship1x,ship2x,ship3x;
GLint shipCounter1;
GLint fireCheck;
Image *fire;
GLfloat playerx;
GLint shipBreaker;
NSMutableArray *bricksArray;
Image *explosion;
AVAudioPlayer *player;
NSMutableArray *allShips;
NSMutableArray *createdShips;
GLint shipCounter;
GLint levelCounter;
NSMutableArray *fireArray;
GLint shipD;
GLint expPosition;
GLint motherShipy;
NSMutableArray *dBricks;
GLint shipBreak;
GLint leveler;
Image *scoreImage;
GLint scoreCounter;
GLboolean isLevel;
Image *levelImage;
GLboolean isGameOver;
Image *gameOverImage;
GLint bonus;
GLboolean leftClear;
GLint shipHitter;
GLint strRemover;
Image *lifeBar;
Image *topBar;
NSMutableArray* barArray;
GLboolean isStared;
NSMutableArray *shipFire;
GLint speedCheck;
GLint levelIndicates;
}
@property(nonatomic,retain)NSMutableArray *shipFire;
@property(nonatomic)float motherShipx2;
@property(nonatomic,retain)Image *motherShip2;
@property(nonatomic)GLboolean isStarted;
@property(nonatomic)GLint scoreCounter;
@property(nonatomic,retain)NSMutableArray *barArray;
@property(nonatomic,retain)Image *topBar;
@property(nonatomic)GLint leveler;
@property(nonatomic,retain)Image *lifeBar;
@property(nonatomic)GLint shipD;
@property(nonatomic,retain)Image *gameOverImage;
@property(nonatomic)GLboolean isLevel;
@property(nonatomic) GLboolean isGameOver;
@property(nonatomic,retain)Image *levelImage;
@property(nonatomic,retain)Image *scoreImage;
@property(nonatomic,retain)NSMutableArray *dBricks;
@property(nonatomic,retain)NSMutableArray *fireArray;
@property(nonatomic,retain)NSMutableArray *createdShips;
@property(nonatomic,retain)NSMutableArray *bricksArray;
@property(nonatomic,retain)AVAudioPlayer *player;
@property(nonatomic,retain)NSMutableArray *allShips;
現在假設我有這樣的對象,在結束遊戲後,我應該在哪裏釋放它們或將內存清空回堆?在OpenGL ES中釋放內存的最佳方式是什麼?
dealloc不調用自己。 –
@Veer:anyupdate .. – Jhaliya