tff memory leak

Issue #62 closed
Benjamin Hoffmann created an issue

I found a memory leak on the ttf module.

import "mod_video"
import "mod_key"
import "mod_text"
import "mod_sound"
import "mod_wm"
import "mod_map"
import "mod_draw"
import "mod_say"
import "mod_file"
import "mod_text"
import "mod_multi"
import "mod_mouse"
import "mod_proc"
import "mod_screen"
import "mod_rand"
import "mod_grproc"
import "mod_math"
import "mod_scroll" 
import "mod_effects"
import "mod_timers"
import "mod_mem"
import "mod_multi"

global
    int ttf;
end 

begin       

    set_mode(400, 400);

    ttf = ttf_load("pixel.ttf");    
    ttf_set_size(ttf, 100);
    write(ttf, 200, 200, z, 4, "Memory leak");

    loop
        if(exit_status)
            exit();
        end
        frame;
    end
end

If you open your task manager, you can see that the memory used by the pxtp.exe process is increasing.

I tested with differents ttf, with write, write_int, write_var, write_string, etc...

Comments (4)

  1. Joseba Echevarria García repo owner

    I can confirm the issue you describe from Linux. I will have a look at it.

    Thanks for reporting.

  2. Log in to comment