MPK example

//Note: Be sure to build the following example with debug data to see diagnostic information.

#include <iostream.h>

#include <windows.h>

 

int

main(int, char **)

{

    static char *ptr = new char[500000];

    //Don't free the memory; retain only a pointer to the middle of it

    ptr += 100;

    //MPK: will show up as potentially leaked

    return(0);

}

(C) Copyright IBM Corporation 1992, 2010.