.examples AndroidMathUtility::Vector now has got safe array destruction (Fix for AVD).

git-svn-id: svn://ultimatepp.org/upp/trunk@9539 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2016-02-28 20:36:16 +00:00
parent 7ece97e561
commit a384a704ff

View file

@ -7,6 +7,7 @@ namespace AndroidMathUtility {
Vector::Vector()
{
this->size = 0;
this->data = NULL;
}
Vector::Vector(int size)
@ -27,11 +28,16 @@ Vector::Vector(const Vector& vec)
data[i] = vec.data[i];
}
}
else {
this->size = 0;
this->data = NULL;
}
}
Vector::~Vector()
{
delete[] data;
if(data != NULL)
delete[] data;
}
float Vector::Get(int id) const