gfx-rs/metal-rs

Raytracing example crash in autorelease

xorza opened this issue · 0 comments

xorza commented

I was playing with Raytracing demo and updated winit dependency to 0.30, which requires different approach of persisting some objects. Migrating demo revealed some problem hidden in Renderer::new() method. Basically to reproduce it without making too many changes and updating winit, just change:

    let mut renderer = renderer::Renderer::new(device);
    renderer.window_resized(cg_size);

to

    let mut renderer = autoreleasepool(|| {
        let mut renderer = renderer::Renderer::new(device);
        renderer.window_resized(cg_size);
        renderer
    });
image

Any advice, I'm not familiar with obj-c intricacies?