L
Lloyd Dupont
I create 2 ManagedC++ class inherithing from each other.
I can't see how do I call super destructor or ensure it's called :-/
template <class T>
public ref class CArray : System::IDisposable
{
protected:
~CArray()
{
if( ptr ) // I'm not sure of what IDisposable will do...
free( ptr );
ptr = nullptr;
}
private:
int length;
T* ptr;
};
template <class T>
public ref class CVector : CArray<T>
{
protected:
~CVector()
{
::~CArray();
}
};
I can't see how do I call super destructor or ensure it's called :-/
template <class T>
public ref class CArray : System::IDisposable
{
protected:
~CArray()
{
if( ptr ) // I'm not sure of what IDisposable will do...
free( ptr );
ptr = nullptr;
}
private:
int length;
T* ptr;
};
template <class T>
public ref class CVector : CArray<T>
{
protected:
~CVector()
{
::~CArray();
}
};