diff options
author | dscho <dscho> | 2002-04-25 13:41:52 +0000 |
---|---|---|
committer | dscho <dscho> | 2002-04-25 13:41:52 +0000 |
commit | efa12fa978ca10c329e4cb14fefa597a6d93f2e8 (patch) | |
tree | 5ee9b933785b16c810a3ba5962afb4f7596cbd58 /example.c | |
parent | 160c85f4ecd37b9ab046403e0bc1b5f834a9c3d4 (diff) | |
download | libtdevnc-efa12fa978ca10c329e4cb14fefa597a6d93f2e8.tar.gz libtdevnc-efa12fa978ca10c329e4cb14fefa597a6d93f2e8.zip |
memleaks patched
Diffstat (limited to 'example.c')
-rw-r--r-- | example.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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); } |