fix: destructor should not change pointer to undefined
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 36s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 36s
This commit is contained in:
@@ -52,7 +52,6 @@ pub fn Layout(comptime Event: type, comptime Renderer: type) type {
|
||||
|
||||
pub fn deinit(this: *LayoutType) void {
|
||||
this.vtable.deinit(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn createFrom(object: anytype) LayoutType {
|
||||
|
||||
@@ -70,7 +70,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
|
||||
},
|
||||
}
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !*Events {
|
||||
|
||||
@@ -109,7 +109,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
|
||||
}
|
||||
this.containers.deinit();
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !*Events {
|
||||
|
||||
@@ -77,7 +77,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
|
||||
}
|
||||
this.elements.deinit();
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !*Events {
|
||||
|
||||
@@ -67,7 +67,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
|
||||
},
|
||||
}
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !*Events {
|
||||
|
||||
@@ -61,7 +61,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
|
||||
},
|
||||
}
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !*Events {
|
||||
|
||||
@@ -109,7 +109,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
|
||||
}
|
||||
this.containers.deinit();
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !*Events {
|
||||
|
||||
@@ -77,7 +77,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
|
||||
}
|
||||
this.elements.deinit();
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !*Events {
|
||||
|
||||
@@ -58,7 +58,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
|
||||
|
||||
pub fn deinit(this: *WidgetType) void {
|
||||
this.vtable.deinit(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn createFrom(object: anytype) WidgetType {
|
||||
|
||||
@@ -42,7 +42,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
|
||||
this.contents.deinit();
|
||||
this.line_index.deinit();
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) ?Event {
|
||||
|
||||
@@ -23,7 +23,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
|
||||
|
||||
pub fn deinit(this: *@This()) void {
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) ?Event {
|
||||
|
||||
@@ -37,7 +37,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
|
||||
|
||||
pub fn deinit(this: *@This()) void {
|
||||
this.allocator.destroy(this);
|
||||
this.* = undefined;
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) ?Event {
|
||||
|
||||
Reference in New Issue
Block a user