<div dir="ltr"><span></span><br><span></span><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
</span>What will happen if you release IDirect3DRM before calling InitFrom*,<br>
and then call InitFrom* expecting already released IDirect3DRM to be valid?<br>
</blockquote><div>As long as you haven't QI'd version 2 and/or version 3 from version 1, each version having their own refcounts (see the refcount tests) it will crash with a segfault. If in case you did QI any other version, the refcount will go to zero but the object won't be destroyed until the other refcounts go down to zero as well (see IDirect3DRM3_Release). I ran a quick test and can confirm this. So overall I guess we can say that it's upto the application's handling of the objects.<br><br>It's odd, but it seems that d3drm will only use version 1's refcount and not touch version 2 and version 3's refcount for version 2 and version 3's InitFromImage respectively.<br></div><div>I'll go ahead and resend the patch with the comment additions.<br></div><div><br><br></div><div>Cheers,<br></div><div>Aaryaman<br></div></div></div></div>