• Emil Velikov's avatar
    examples: make use of waffle_teardown · feac668c
    Emil Velikov authored
    Using this we clear the global state thus the user can call waffle_init()
    multiple times, as things won't get clobbered.
    According to gl_basic we cleanup ~20K of leaks (still reachable) and catch
    a bug in the GL/dri2 loader :-)
    
    Before:
        definitely lost: 63 bytes in 4 blocks
        still reachable: 43,695 bytes in 116 blocks
    
    After:
        definitely lost: 87 bytes in 5 blocks
        still reachable: 23,451 bytes in 55 blocks
    Signed-off-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: default avatarChad Versace <chad.versace@intel.com>
    feac668c