summaryrefslogtreecommitdiffstats
path: root/example.c
diff options
context:
space:
mode:
authordscho <dscho>2002-04-25 13:41:52 +0000
committerdscho <dscho>2002-04-25 13:41:52 +0000
commitefa12fa978ca10c329e4cb14fefa597a6d93f2e8 (patch)
tree5ee9b933785b16c810a3ba5962afb4f7596cbd58 /example.c
parent160c85f4ecd37b9ab046403e0bc1b5f834a9c3d4 (diff)
downloadlibtdevnc-efa12fa978ca10c329e4cb14fefa597a6d93f2e8.tar.gz
libtdevnc-efa12fa978ca10c329e4cb14fefa597a6d93f2e8.zip
memleaks patched
Diffstat (limited to 'example.c')
-rw-r--r--example.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/example.c b/example.c
index 41165c7..01ec504 100644
--- a/example.c
+++ b/example.c
@@ -262,6 +262,17 @@ int main(int argc,char** argv)
/* initialize the server */
rfbInitServer(rfbScreen);
+#define USE_OWN_LOOP
+#ifdef USE_OWN_LOOP
+ {
+ int i;
+ for(i=0;i<200;i++) {
+ fprintf(stderr,"%d\r",i);
+ rfbProcessEvents(rfbScreen,100000);
+ }
+ }
+#else
+
#ifndef BACKGROUND_LOOP_TEST
/* this is the blocking event loop, i.e. it never returns */
/* 40000 are the microseconds, i.e. 0.04 seconds */
@@ -274,6 +285,11 @@ int main(int argc,char** argv)
rfbRunEventLoop(rfbScreen,-1,TRUE);
/* now we could do some cool things like rendering */
while(1) sleep(5); /* render(); */
-
+#endif
+
+ rfbFreeCursor(rfbScreen->cursor);
+ free(rfbScreen->frameBuffer);
+ rfbScreenCleanup(rfbScreen);
+
return(0);
}