duplicate a image with gs

JeaDea <>
Fri Apr 14 08:48:12 CEST 2006


My code is

-module(test).
-export([init/0]).

init() ->
    Gs = gs:start(),

    Win = gs:create(window, Gs,[{map,true},{title,"Drainage
Mine"},{width,620},{height,500}]),

    Cs = gs:create(canvas,CCs,[{width,620},{height,500},{bg,white}]),

    gs:create(image,Cs,[{coords,[{50,50}]},{load_gif,"myImage.gif"}]),

    loop(Cs,50,50).

loop(Cs,X,Y) ->
    gs:create(image,Cs,[{coords,[{X,Y}]},{load_gif,"myImage.gif"}),
    loop(Cs,X,Y+20).
The problem is load_gif, each time a new gif is loaded in memory (the old
ones aren't unloaded) so that the memory never stops growing... until
overflow...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060414/765e4012/attachment.html>


More information about the erlang-questions mailing list