Skip to content

Commit

Permalink
It adds new test to cover some specific memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesneimog committed Dec 8, 2023
1 parent ca23b06 commit b2d6e90
Show file tree
Hide file tree
Showing 14 changed files with 525 additions and 247 deletions.
32 changes: 10 additions & 22 deletions test/01-Install-modules.pd
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#N canvas 686 36 967 880 8;
#X obj 5 5 py4pd -lib py4pd;
#X obj 157 77 delay 1000 1 msec;
#X obj 135 34 t b b;
#X obj 37 94 t b b;
#X obj 59 148 print quit;
#X msg 59 118 :( not work;
#X msg 37 373 \; pd quit;
#X msg 179 261 :) ALL Test PY4PDPASS;
#X obj 179 282 print PASS;
Expand All @@ -13,22 +9,14 @@
#X obj 238 31 bng 15 250 50 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000;
#X obj 218 12 bng 15 250 50 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000;
#X obj 87 261 delay 10 1 msec;
#X obj 37 73 delay 25000 1 msec;
#X obj 157 146 py4pd;
#X msg 157 98 pipinstall local numpy;
#X connect 1 0 16 0;
#X connect 2 0 14 0;
#X connect 2 1 1 0;
#X connect 3 0 6 0;
#X connect 3 1 5 0;
#X connect 5 0 4 0;
#X connect 7 0 8 0;
#X connect 9 0 13 0;
#X connect 9 1 7 0;
#X connect 10 0 2 0;
#X connect 11 0 1 0;
#X connect 12 0 2 0;
#X connect 13 0 6 0;
#X connect 14 0 3 0;
#X connect 15 0 9 0;
#X connect 16 0 15 0;
#X msg 157 98 pipinstall numpy;
#X connect 1 1 11 0;
#X connect 3 0 4 0;
#X connect 5 0 9 0;
#X connect 5 1 3 0;
#X connect 6 0 1 0;
#X connect 8 0 1 0;
#X connect 9 0 2 0;
#X connect 10 0 5 0;
#X connect 11 0 10 0;
42 changes: 19 additions & 23 deletions test/11-Loop-inside-Loop.pd → test/06-Loop-inside-Loop.pd
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#N canvas 597 25 1179 954 8;
#N canvas 870 -18 1179 954 8;
#X obj 5 5 py4pd -lib py4pd;
#X obj 135 10 r start-test;
#X obj 27 315 sel 0 1;
#X obj 27 355 print ERROR;
#X obj 43 336 print PASS;
#X msg 5 453 \; pd quit;
#X msg 5 421 \; pd quit;
#X obj 5 295 t b f;
#X obj 135 111 py.iterate;
#N canvas 69 374 626 577 loop 0;
Expand Down Expand Up @@ -39,31 +39,29 @@
#X obj 182 317 sel 1;
#X obj 182 338 int 1;
#X obj 182 359 + 1;
#X obj 182 380 expr if($f1 > 20000 \, 1 \, 0);
#X obj 182 401 sel 1 0, f 29;
#X obj 253 465 s again;
#X obj 253 447 s again;
#X obj 206 10 r again;
#X obj 107 13 bng 15 250 50 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000;
#X obj 253 431 del 0 1 msec;
#X obj 75 147 py.memuse;
#X msg 75 119 pd;
#X obj 75 168 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
#X obj 10 249 expr if(($f1 - $f2) < 3 \, 1 \, 0);
#X msg 182 422 pd;
#X obj 10 191 py.memuse;
#X obj 10 212 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
#X obj 182 380 expr if($f1 > 1000 \, 1 \, 0);
#X obj 253 427 delay 0 1 samp;
#X msg 273 308 0;
#X connect 1 0 11 0;
#X connect 1 0 36 0;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 6 0 5 0;
#X connect 6 1 2 0;
#X connect 7 0 8 0;
#X connect 7 1 9 0;
#X connect 8 0 9 0;
#X connect 9 0 14 0;
#X connect 10 0 7 0;
#X connect 11 0 13 0;
#X connect 11 0 33 0;
#X connect 11 1 12 0;
#X connect 12 0 10 1;
#X connect 13 0 10 0;
Expand All @@ -83,18 +81,16 @@
#X connect 26 0 27 0;
#X connect 27 0 28 0;
#X connect 28 0 27 1;
#X connect 28 0 29 0;
#X connect 29 0 30 0;
#X connect 30 0 39 0;
#X connect 30 1 34 0;
#X connect 28 0 38 0;
#X connect 29 0 36 0;
#X connect 29 1 39 0;
#X connect 31 0 11 0;
#X connect 32 0 11 0;
#X connect 33 0 11 0;
#X connect 33 0 36 0;
#X connect 34 0 31 0;
#X connect 35 0 37 0;
#X connect 36 0 35 0;
#X connect 37 0 38 1;
#X connect 38 0 6 0;
#X connect 39 0 40 0;
#X connect 40 0 41 0;
#X connect 41 0 38 0;
#X connect 33 0 34 0;
#X connect 34 0 35 1;
#X connect 35 0 6 0;
#X connect 36 0 37 0;
#X connect 37 0 35 0;
#X connect 38 0 29 0;
#X connect 39 0 30 0;
#X connect 40 0 27 0;
106 changes: 0 additions & 106 deletions test/06-Objects.pd

This file was deleted.

92 changes: 47 additions & 45 deletions test/07-MemoryLeaks.pd
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
#N canvas 342 32 1368 844 8;
#N canvas 342 32 1368 929 8;
#X obj 8 6 py4pd -lib py4pd;
#X obj 10 48 bng 25 250 50 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000;
#X obj 10 79 t b b b b b b b, f 111;
#X obj 10 28 r start-test;
#X msg 10 106 pd;
#X obj 10 185 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
#X obj 10 220 list;
#X obj 27 201 r mem;
#X obj 10 164 py.memuse;
#X obj 10 249 expr if(($f1 - $f2) < 3 \, 1 \, 0);
#X obj 34 288 sel 0 1;
#X obj 34 328 print ERROR;
#X obj 50 309 print PASS;
#X msg 10 373 \; pd quit;
#X obj 10 268 t b f;
#X obj 10 211 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
#X obj 10 246 list;
#X obj 27 227 r mem;
#X obj 10 190 py.memuse;
#X obj 10 287 expr if(($f1 - $f2) < 3 \, 1 \, 0);
#X obj 34 326 sel 0 1;
#X obj 34 394 print ERROR;
#X obj 50 345 print PASS;
#X msg 10 435 \; pd quit;
#X obj 10 306 t b f;
#X obj 102 106 mem/problem1;
#X obj 102 127 nbx 7 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
#X obj 194 124 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
Expand All @@ -26,40 +24,44 @@
#X obj 470 122 mem/problem5;
#X obj 562 191 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
#X obj 562 170 py.memuse;
#X msg 562 107 pd;
#X obj 562 210 s mem;
#X obj 470 143 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000 0 256;
#X obj 102 146 bng 15 250 50 0 empty empty empty 0 -8 0 8 #fcfcfc #000000 #000000;
#X listbox 169 250 20 0 0 0 - - - 0;
#X obj 10 349 delay 40 1 msec;
#X connect 1 0 2 0;
#X connect 2 1 15 0;
#X connect 2 2 18 0;
#X connect 2 3 20 0;
#X connect 2 4 22 0;
#X connect 2 5 24 0;
#X connect 2 6 27 0;
#X connect 3 0 1 0;
#X connect 4 0 8 0;
#X connect 5 0 6 0;
#X connect 6 0 9 0;
#X connect 6 0 31 0;
#X connect 7 0 6 1;
#X connect 8 0 5 0;
#X connect 9 0 14 0;
#X connect 10 0 11 0;
#X connect 10 1 12 0;
#X connect 14 0 32 0;
#X connect 14 1 10 0;
#X connect 15 0 16 0;
#X connect 16 0 30 0;
#X obj 10 417 delay 40 1 msec;
#X obj 10 265 t l l, f 21;
#X obj 34 369 list, f 19;
#X obj 10 79 t b b b b b b b b, f 111;
#X obj 99 6 py4pd -lib multichannel;
#X obj 483 101 mem/problem6;
#X connect 1 0 31 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 29 0;
#X connect 5 0 4 1;
#X connect 6 0 3 0;
#X connect 7 0 12 0;
#X connect 8 0 30 0;
#X connect 8 1 10 0;
#X connect 12 0 28 0;
#X connect 12 1 8 0;
#X connect 13 0 14 0;
#X connect 14 0 27 0;
#X connect 16 0 15 0;
#X connect 18 0 17 0;
#X connect 20 0 19 0;
#X connect 22 0 21 0;
#X connect 22 1 23 0;
#X connect 24 0 29 0;
#X connect 25 0 28 0;
#X connect 26 0 25 0;
#X connect 27 0 26 0;
#X connect 30 0 4 0;
#X connect 32 0 13 0;
#X connect 20 1 21 0;
#X connect 22 0 26 0;
#X connect 23 0 25 0;
#X connect 24 0 23 0;
#X connect 27 0 6 0;
#X connect 28 0 11 0;
#X connect 29 0 7 0;
#X connect 29 1 30 1;
#X connect 30 0 9 0;
#X connect 31 1 13 0;
#X connect 31 2 16 0;
#X connect 31 3 18 0;
#X connect 31 4 20 0;
#X connect 31 5 22 0;
#X connect 31 6 33 0;
#X connect 31 7 24 0;
Loading

0 comments on commit b2d6e90

Please sign in to comment.