[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave memory leak
From: |
Andreas Weber |
Subject: |
Re: octave memory leak |
Date: |
Mon, 19 Feb 2018 18:26:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Am 19.02.2018 um 17:08 schrieb Donald Boucher:
> myBar = waitbar(0, 'testing...');
> numBars = 50;
> numRepeat = 200;
> counter = 0;
> for j = 1:numRepeat
> for i = 1:numBars
> msg = sprintf('testing... %d/%d\n%d/%d', i, numBars, j, numRepeat);
> myBar = waitbar(i/numBars, hwbar=myBar, msg);
> counter = counter + 1;
> end
> end
> delete(myBar);
> printf('finished');
>
> Thanks.
You are creating 50 * 200 individual waitbars instead using the
existent. See the example in "demo waitbar"
h = waitbar (0, '0.00%');
for i = 0:0.01:1
waitbar (i, h, sprintf ('%.2f%%', 100*i));
endfor
close (h);