From 9b31c8353e11c4435045e5749b629f81c0d6a8bb Mon Sep 17 00:00:00 2001 From: TORRI Vincent Date: Mon, 1 May 2006 23:45:00 +0200 Subject: [PATCH] better leak fix in non shm mode --- tests/lissajoux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/lissajoux.c b/tests/lissajoux.c index 49942ca..f8c8e91 100644 --- a/tests/lissajoux.c +++ b/tests/lissajoux.c @@ -110,7 +110,7 @@ step (Data *datap) loop_count++; t = get_time () - time_start; - if (t <= 20.0) + if (t <= 2.0) { draw_lissajoux (datap); } @@ -119,9 +119,7 @@ step (Data *datap) printf("FRAME COUNT..: %i frames\n", loop_count); printf("TIME.........: %3.3f seconds\n", t); printf("AVERAGE FPS..: %3.3f fps\n", (double)loop_count / t); - /* if datap->image is not NULL, this means that */ - /* we are using the SHM mode */ - if (datap->image) + if (do_shm) XCBImageSHMDestroy (datap->image); XCBDisconnect (datap->conn); exit(0); -- 2.34.1