Hi Vitali,

Thanks for the clarifications. I was mostly worried about an access violation. 
If the pointer is valid then I can just make some invalidation mechanism that 
will drop all pending updates after a format change and skip any frames that 
were being encoded at the moment of notifiaction if such a race occurs. I was 
only worried that the pointer may become invalid. Thank you very much:)

-----Original Message-----
From: "Vitali Pelenjow" <vitali.pelen...@oracle.com>
Sent: ‎03/‎02/‎2016 12:07
To: "Rūdolfs Bundulis" <rudolfs.bundu...@gmail.com>; "vbox-dev@virtualbox.org" 
<vbox-dev@virtualbox.org>
Subject: Re: [vbox-dev] VirtualBox 5.x IDisplaySourceBitmap life cycle

Hi,

the VRAM pointer will be valid, because it points to the memory 
allocated for the VM graphics device.
The memory is deallocated when VM shuts down.

However the memory content might change of course.

Vitali

On 2/3/2016 11:01 AM, Rūdolfs Bundulis wrote:
> >  Yes, it is an automatically generated file, a COM wrapper based on 
> the IDL description. It does make navigating the source code a bit 
> harder.
> Ok thanks for clearing this out.
>
> I managed  to find the place where the memory is actually handled 
> - DisplaySourceBitmap::initSourceBitmap() in 
> DisplaySourceBitmapImpl.cpp. It seems that in case the VRAM is not 
> used my assumption is true and the IDisplaySourceBitmap frees the 
> allocated memory in its dtor so as long as I keep a reference I'm 
> safe. But in case VRAM is used, what happens if a 
> IDisplaySourceBitmap instance is still alive when the resolution 
> changes - does the contained pointer simply become invalid?
>
>
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev@virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev

_______________________________________________
vbox-dev mailing list
vbox-dev@virtualbox.org
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to