wip: diagnosing memleaks