Oops, yes, I did not notice that in your source, I should have.
Code:
cache = new PVideoFrame[end - start];
You have to use below syntax to delete, when allocating array as above, eg [blue part]
The [] bit causes it to call destructor on each element of the array.