examples: fix incorrect release of resources in fractal-cube

This commit is contained in:
iddev5 2022-04-28 22:20:05 +05:30 committed by Stephen Gutekanst
parent 69049da970
commit ffcd5dfaa8

View file

@ -162,7 +162,7 @@ pub fn main() !void {
.size = .{ .width = app.current_desc.width, .height = app.current_desc.height }, .size = .{ .width = app.current_desc.width, .height = app.current_desc.height },
.format = app.swap_chain_format, .format = app.swap_chain_format,
}); });
defer cube_texture.release(); defer cube_texture_render.release();
const sampler = app.device.createSampler(&gpu.Sampler.Descriptor{ const sampler = app.device.createSampler(&gpu.Sampler.Descriptor{
.mag_filter = .linear, .mag_filter = .linear,
@ -183,7 +183,7 @@ pub fn main() !void {
.mip_level_count = 1, .mip_level_count = 1,
.array_layer_count = 1, .array_layer_count = 1,
}); });
defer cube_texture_view.release(); defer cube_texture_view_render.release();
const bind_group = app.device.createBindGroup( const bind_group = app.device.createBindGroup(
&gpu.BindGroup.Descriptor{ &gpu.BindGroup.Descriptor{