IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 3, 2004, 5:20:08 PM (22 years ago)
Author:
gusciora
Message:

Added memory leak chewcks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psHash02.c

    r584 r860  
    11/*****************************************************************************
    2     This code tests whether hash tables entries can be inserted correctly.
     2    This code will test whether hash tables entries can be inserted correctly.
    33 
    44    GUS: Add code to test whether duplicates are handled correctly (use a
    5     small hast table and lots of keys).
     5    small hash table and lots of keys).
    66 *****************************************************************************/
    77#include <stdio.h>
     
    4141    char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL};
    4242    char *myData[] = {"IDA", "IDB", "IDC", "IDD", NULL};
     43    int currentId = psMemGetId();
     44    int memLeaks        = 0;
    4345
    4446    printPositiveTestHeader(stdout,
     
    6971                testStatus);
    7072
     73    psHashFree(myHashTable, NULL);
     74
     75    memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
     76    if (0 != memLeaks) {
     77        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
     78    }
     79    psMemCheckCorruption(1);
     80
    7181    return (!testStatus);
    7282}
Note: See TracChangeset for help on using the changeset viewer.