<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 29, 2016 at 8:01 PM, Henri Verbeet <span dir="ltr"><<a href="mailto:hverbeet@gmail.com" target="_blank">hverbeet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 29 June 2016 at 16:13, Aaryaman Vasishta <<a href="mailto:jem456.vasishta@gmail.com">jem456.vasishta@gmail.com</a>> wrote:<br>
> This is a helper function, so the caller would be handling the references.<br>
> See CreateDeviceFromD3D in device.c.<br>
><br>
</span>That construction makes it harder to verify correctness, so in general<br>
I'd recommend against that. Regardless, d3drm_device_destroy() takes<br>
care of the device reference, but doesn't help for the IDirect3DRM<br>
reference, since that's only released when device->ddraw is set.<br></blockquote><div>device->ddraw is set while returning. What should be the better approach here?<br><br></div><div>Cheers,<br></div><div>Aaryaman<br></div></div><br></div></div>