Browse Source

Lwd: minor optimisation to prevent rare memory leaks

nottui-full-sensor
Frédéric Bour 1 year ago
parent
commit
0968c59175
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      lib/lwd/lwd.ml

+ 3
- 2
lib/lwd/lwd.ml View File

@ -330,9 +330,10 @@ let rec sub_release
if revidx < count then (
let obj = tn.entries.(count) in
tn.entries.(revidx) <- obj;
tn.entries.(count) <- dummy;
mov_idx self count revidx obj
);
tn.entries.(count) <- dummy;
) else
tn.entries.(revidx) <- dummy;
if tn.active > count then tn.active <- count;
if count = 4 then (
(* downgrade to [T4] to save space *)


Loading…
Cancel
Save