Fix memory leak in GLViewImpl

This commit is contained in:
mogemimi 2015-10-19 19:46:45 +09:00
parent f4a2a53f6d
commit 34831d48ce
3 changed files with 11 additions and 11 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}