mirror of https://github.com/axmolengine/axmol.git
Fix memory leak in GLViewImpl
This commit is contained in:
parent
f4a2a53f6d
commit
34831d48ce
cocos/platform
|
@ -58,7 +58,7 @@ GLViewImpl* GLViewImpl::createWithRect(const std::string& viewName, Rect rect, f
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ GLViewImpl* GLViewImpl::create(const std::string& viewName)
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ GLViewImpl* GLViewImpl::createWithFullScreen(const std::string& viewName)
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ GLViewImpl* GLViewImpl::create(const std::string& viewName)
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ GLViewImpl* GLViewImpl::createWithRect(const std::string& viewName, Rect rect, f
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ GLViewImpl* GLViewImpl::createWithFullScreen(const std::string& viewName)
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -336,7 +336,7 @@ GLViewImpl* GLViewImpl::createWithFullScreen(const std::string& viewName, const
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ GLViewImpl* GLViewImpl::createWithEAGLView(void *eaglview)
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ GLViewImpl* GLViewImpl::create(const std::string& viewName)
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ GLViewImpl* GLViewImpl::createWithRect(const std::string& viewName, Rect rect, f
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ GLViewImpl* GLViewImpl::createWithFullScreen(const std::string& viewName)
|
|||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue