fix memory leak in closing connections

This commit is contained in:
Noa Aarts 2024-10-19 14:05:37 +02:00
parent b0d74880dd
commit de3248c3c6
Signed by: noa
GPG key ID: 1850932741EFF672
7 changed files with 98 additions and 42 deletions

View file

@ -4,6 +4,7 @@
use std::sync::atomic::AtomicU64;
pub use color::Color;
use grid::Grid;
pub mod config;
@ -12,6 +13,8 @@ pub mod grid;
pub mod protocols;
pub mod utils;
mod color;
pub type Canvas = u8;
pub type Coordinate = u16;
@ -46,13 +49,6 @@ fn increment_counter(amount: u64) {
COUNTER.fetch_add(amount, std::sync::atomic::Ordering::Relaxed);
}
#[derive(Debug, PartialEq)]
pub enum Color {
RGB24(u8, u8, u8),
RGBA32(u8, u8, u8, u8),
W8(u8),
}
#[derive(Debug, PartialEq)]
pub enum Protocol {
Text,