custom: add Write.deinit and fix WildNoise.deinit

This commit is contained in:
Luna 2019-08-14 09:13:06 -03:00
parent e142285a32
commit a33db9f060

View file

@ -91,7 +91,7 @@ pub const WildNoise = struct {
}
}
pub fn deinit(self: *RandomNoise) void {
pub fn deinit(self: *WildNoise) void {
if (self.allocator == null) return;
if (self.rand_buf == null) return;
self.allocator.?.free(self.rand_buf.?);
@ -125,6 +125,8 @@ pub const Write = struct {
};
}
pub fn deinit(self: *Write) void {}
pub fn run(self: *Write, bufs: *RunBuffers) void {
bufs.out[0] = self.data;
}