I stumbled over a behaviour that I cant completely understand.
Given the documentation for the CreateImageMap():
If this function is successful the ImageIn is shared by the ImageOut to ensure its life-time. When not needed anymore the ImageOut must be released via ReleaseObject. In that case also the ImageIn is released.
And the following code:
IMG image; cvbbool_t success = LoadImageFile("PathToSomeBigImage", image); IMG imagerotated; CreateRotatedImageMap(image, VPATROT_90, imagerotated); // Keeps storage ReleaseObject(imagerotated); ReleaseObject(image); // until here
I would have assumed, that the first ReleaseObject() call would have also freed the storage that was allocated by image.
However this storage is allocated until the second ReleaseObject() call on the original image was successful.
Do I miss something?