VC++ 关于一些对象的释放问题
新手。写了一些东西,成功了(基本),就是不知道哪些东西要释放,如下:CGraphic*m_pG;LPDIRECTDRAWSURFACE7m_pBImage[4];CBac...
新手。写了一些东西,成功了(基本),就是不知道哪些东西要释放,如下:CGraphic* m_pG;
LPDIRECTDRAWSURFACE7 m_pBImage[4];
CBackGround* m_pBackGround;
CFire* m_pFire[20];
Cenemy* m_pEnemy[10];BITMAP PictureMessage;
BITMAP EnemyPicMsg;
RECT ManRect;
POINT ManPoint;
RECT WindowRect;
RECT EnemyC;
bool Lock;HBITMAP m_nowpicture3; HBITMAP m_nowpicture1; HBITMAP m_nowpicture2;
m_pG=new CGraphic;
m_pBackGround=new CBackGround;
for(int i=0;i<20;i++)
{
m_pFire[i]=new CFire;
}
for(i=0;i<10;i++)
{
m_pEnemy[i]=new Cenemy;
} 展开
LPDIRECTDRAWSURFACE7 m_pBImage[4];
CBackGround* m_pBackGround;
CFire* m_pFire[20];
Cenemy* m_pEnemy[10];BITMAP PictureMessage;
BITMAP EnemyPicMsg;
RECT ManRect;
POINT ManPoint;
RECT WindowRect;
RECT EnemyC;
bool Lock;HBITMAP m_nowpicture3; HBITMAP m_nowpicture1; HBITMAP m_nowpicture2;
m_pG=new CGraphic;
m_pBackGround=new CBackGround;
for(int i=0;i<20;i++)
{
m_pFire[i]=new CFire;
}
for(i=0;i<10;i++)
{
m_pEnemy[i]=new Cenemy;
} 展开
1个回答
2013-05-11
展开全部
new了就一定要delete,
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询