Tryed to improve memory managing with deletes

Signed-off-by: Lasconik <caillouxnicolas@gmail.com>