Vincent Povirk wrote:
> You're adding a test that relies on a corner case that should be
> regarded as a broken program, and that could easily result in a
> use-after-free on native. I'm not convinced this is reliable, as the
> native codepath could involve a use-after-free and still work by
> co
>> > an image passed to GdipGetImageGraphicsContext() is destroyed right after
>> > the graphics object was created, then later on all calls using that HDC
>> > fail
>> > and silently lead to using invalid or not initilazed values.
>>
>> You have to keep the image alive as long as you're using the
Vincent Povirk wrote:
> > an image passed to GdipGetImageGraphicsContext() is destroyed right after
> > the graphics object was created, then later on all calls using that HDC fail
> > and silently lead to using invalid or not initilazed values.
>
> You have to keep the image alive as long as yo
> an image passed to GdipGetImageGraphicsContext() is destroyed right after
> the graphics object was created, then later on all calls using that HDC fail
> and silently lead to using invalid or not initilazed values.
You have to keep the image alive as long as you're using the Graphics
object. If