Semi-permanent implementation of memory leak checking