<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">Hi Vitali,<br><br>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:)</div></div><div dir="ltr"><hr><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">From: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:Vitali.Pelenjow@oracle.com">Vitali Pelenjow</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Sent: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">‎03/‎02/‎2016 12:07</span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">To: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:rudolfs.bundulis@gmail.com">Rūdolfs Bundulis</a>; <a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Subject: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">Re: [vbox-dev] VirtualBox 5.x IDisplaySourceBitmap life cycle</span><br><br></div>Hi,<br><br>the VRAM pointer will be valid, because it points to the memory <br>allocated for the VM graphics device.<br>The memory is deallocated when VM shuts down.<br><br>However the memory content might change of course.<br><br>Vitali<br><br>On 2/3/2016 11:01 AM, Rūdolfs Bundulis wrote:<br>> >  Yes, it is an automatically generated file, a COM wrapper based on <br>> the IDL description. It does make navigating the source code a bit <br>> harder.<br>> Ok thanks for clearing this out.<br>><br>> I managed  to find the place where the memory is actually handled <br>> - DisplaySourceBitmap::initSourceBitmap() in <br>> DisplaySourceBitmapImpl.cpp. It seems that in case the VRAM is not <br>> used my assumption is true and the IDisplaySourceBitmap frees the <br>> allocated memory in its dtor so as long as I keep a reference I'm <br>> safe. But in case VRAM is used, what happens if a <br>> IDisplaySourceBitmap instance is still alive when the resolution <br>> changes - does the contained pointer simply become invalid?<br>><br>><br>><br>><br>> _______________________________________________<br>> vbox-dev mailing list<br>> vbox-dev@virtualbox.org<br>> https://www.virtualbox.org/mailman/listinfo/vbox-dev<br><br></body></html>