IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 12, 2025, 4:47:51 PM (8 months ago)
Author:
eugene
Message:

free memory on exit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/gprint.c

    r41483 r42938  
    9393
    9494  pthread_mutex_unlock (&init_stream_mutex);
     95}
     96
     97// call just before exiting opihi-based programs
     98void gprintFree () {
     99  for (int i = 0; i < Nstreams; i++) {
     100    FreeIOBuffer (streams[i][0].buffer);
     101    FREE (streams[i][0].buffer);
     102    FREE (streams[i][0].name);
     103    FREE (streams[i]);
     104  }
     105  FREE (streams);
     106  return;
    95107}
    96108
Note: See TracChangeset for help on using the changeset viewer.