diff --git a/src/Frame.h b/src/Frame.h index 6ea49bb70b..74a2367b71 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -44,6 +44,12 @@ inline void Unref(Frame* f); class Frame { public: + ~Frame() { + // Unref() all elements. + for ( int i = 0; i < size; i++ ) + frame[i] = nullptr; + } + /** * Returns the size of the frame. *