.examples Fix AndroidMath MemoryManger class

git-svn-id: svn://ultimatepp.org/upp/trunk@9573 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2016-03-06 12:42:09 +00:00
parent d93859a302
commit c0ccc87f10
7 changed files with 94 additions and 51 deletions

View file

@ -22,10 +22,10 @@ Vector::Vector(int size)
Vector::Vector(const Vector& vec)
{
if(vec.GetSize() > 0) {
size = vec.GetSize();
data = new float[size];
this->size = vec.GetSize();
this->data = new float[size];
for(int i = 0; i < size; i++) {
data[i] = vec.data[i];
this->data[i] = vec.data[i];
}
}
else {
@ -36,8 +36,7 @@ Vector::Vector(const Vector& vec)
Vector::~Vector()
{
if(data != NULL)
delete[] data;
//delete[] data;
}
float Vector::Get(int id) const