View Single Post
Old 23rd May 2019, 23:38   #5  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by Wilbert View Post
If you set it to NULL there is nothing to delete. I guess 'delete cache[];' should work since it's an array (but it will not do anything in this case).
"delete cache[];" is apparently not valid syntax. As I understand it, "delete cache;" should call delete on all the PVideoFrames in the array, but since they have been set to NULL, I would have expected it to do nothing. Something is trying to something, though. Maybe that kind of NULL safety isn't a feature of smart pointers, because simply setting them to NULL is equivalent to deletion (or so I understand).
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote