S
silverburgh.meryl
Hi,
I have a class attribute 'vector<float>'
class MyClass {
public:
virtual ~MyClass();
private:
vector<float> aVector;
};
I would like to know what do I need to do to free the memory used in
'aVector'.
I think i need to do 'clear()' to free each float in the aVector, but
do I need to anything specifically to free the vector itself.
MyClass::~MyClass() {
aVector.clear();
}
Thank you.
I have a class attribute 'vector<float>'
class MyClass {
public:
virtual ~MyClass();
private:
vector<float> aVector;
};
I would like to know what do I need to do to free the memory used in
'aVector'.
I think i need to do 'clear()' to free each float in the aVector, but
do I need to anything specifically to free the vector itself.
MyClass::~MyClass() {
aVector.clear();
}
Thank you.