mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.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:
parent
7ece97e561
commit
a384a704ff
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue